Sheduller and DB

May i combine Sheduller and grid inside template ?

or how i transmit values or data to shedullers template ???

  • i need to assign people from database to sheduller
  • i need to assign people from database to sheduller
    check samples\03_extensions\22_multiselect_initial_loading.html

thx …

be thinking

$scheduler = new SchedulerConnector($res,“Oracle”);

	$app = new OptionsConnector($res,"Oracle");

$app->render_table(“MHC_T_TYPE_APPOINTMENTS”,“ID_APPNT_TYPE”,“ID_APPNT_TYPE(value),APPNT_NAME(label)”);
$scheduler->set_options(“ID_PERSON”, $cross->options);
$scheduler->set_options(“typev”, $app);

in Sheduller ID_APPNT_TYPE(value) has a value, but APPNT_NAME(label) has empty value “”

<coll_options for=‘ID_PERSON’></coll_options><coll_options for=‘typev’></coll_options>

pretty strange

related table in db has non empty values, and its type something like varchar or text, right?

in DB no empty values type is varchar…

a test it with date value same thing nothing value is empty

correct type in DB varchar2 using Oracle

so it nothing ???

Above code has not any visible errors and must work correctly. It must place value of APPNT_NAME as the label of options.

If issue still actual - try to enable server side logs and check - does it have some errors during data generation.

i have found problem on base_connector in log files

[05-Dec-2010 17:21:33] PHP Notice: Undefined index: label in /www/Connector/base_connector.php on line 235
[05-Dec-2010 17:21:33] PHP Notice: Undefined index: label in /www/Connector/base_connector.php on line 235

when it not an label, at xml file value is null

If issue still actual - can you provide full content of log, for problematic operation.

[08-Dec-2010 16:53:08] PHP Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /www/Connector/db_oracle.php on line 32
[08-Dec-2010 17:03:25] PHP Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /www/Connector/db_oracle.php on line 32
[08-Dec-2010 17:03:25] PHP Notice: Undefined index: labe in /www/Connector/base_connector.php on line 235
[08-Dec-2010 17:03:25] PHP Notice: Undefined index: labe in /www/Connector/base_connector.php on line 235

nothing except this …
it seems like “value” is working, but “label” is not and return value label is null.

i change label->value and in xml respond me a varchar2 value that i need, not a label ;(

i looked at base_connector.php and options_connector.php
and found that options_connector.php have
$str .= “<item value=”".$this->data[$this->config->data[0][‘db_name’]]."" label="".$this->data[$this->config->data[1][‘db_name’]]."" />";

and in base_connector.php
public function to_xml_start(){
$str="<item";
for ($i=0; $i < sizeof($this->config->data); $i++){
$name=$this->config->data[$i][“name”];
$str.=" “.$name.”=’".$this->xmlentities($this->data[$name])."’";
}
return $str.">";
}

try to enable server side logs and check
By server side log I mean
docs.dhtmlx.com/doku.php?id=dhtm … nd_logging

This inner log will contain all executed sql requests, so it will be possible to check which data script fetches from DB.

[14-Dec-2010 21:36:23] PHP Warning: error_log(…/www/events_logs.txt) [function.error-log]: failed to open stream: Permission denied in /www/Connector/tools.php on line 192

how to resolve ?

log

SELECT ID_APPNT_TYPE,ID_APPNT_TYPE as value,APPNT_NAME as label FROM MHC_T_TYPE_APPOINTMENTS

Undefined index: label at /www/Connector/base_connector.php line 235

Undefined index: label at /www/Connector/base_connector.php line 235

array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object at /www/Connector/db_oracle.php line 32

Try to use the attached php file instead of the original one
db_oracle.zip (1.21 KB)

work, but now I get label same like ID value, not a text of appoinmet ;(

<coll_options for=‘type’></coll_options>

Sorry for inconvenience, valid patch is attached.
db_oracl2.zip (1.21 KB)

thanks

it much better :smiley: now

about grid and sheduller

in tabbar i have

and

how i catch selected element from grid, when i add event on sheduller ???