Hello,
I am new to dhtmlx and I am using dhtmlx connector to extract events from an oracle database and display them on dhtmlxsheduler. The events do not display on the calendar. The code I am using and an extract of the xml retrieved is shown below.
Connector code
<?php
require("E:\web\dhtmlxSuite\dhtmlxConnector_php\codebase\scheduler_connector.php");
require("E:\web\dhtmlxSuite\dhtmlxConnector_php\codebase\db_oracle.php");
include ("E:\web\dhtmlxSuite\system.inc.php");
$res = oci_connect($UID,$PWD,$SID);
$schedulerConn = new SchedulerConnector($res,"ORACLE");
$schedulerConn->enable_log("temp.log",true);
$schedulerConn->render_sql("SELECT TO_CHAR(STARTTIME,'DD-Mon-YYYY HH24:MI:SS')starttime,TO_CHAR(FINISHTIME,'DD-Mon-YYYY HH24:MI:SS')finishtime,MODULEID,ROOMID FROM TT_TEST","SLOTID","STARTTIME,FINISHTIME,MODULEID,ROOMID");
?>
Hello Thanks very much for your help. The events are now displaying on the calendar but not displaying all the data. The scheduler does not appear to be picking up all the data so the moduleid shows but not the roomid and firefox does not display correctly which makes me wonder if there is an error in the code somewhere. Code is now as below:
connector.php
<?php
require("E:\web\dhtmlxSuite\dhtmlxConnector_php\codebase\scheduler_connector.php");
require("E:\web\dhtmlxSuite\dhtmlxConnector_php\codebase\db_oracle.php");
include ("E:\web\dhtmlxSuite\system.inc.php");
$res = oci_connect($UID,$PWD,$SID);
$schedulerConn = new SchedulerConnector($res,"ORACLE");
$schedulerConn->enable_log("E:\ACS\dhtmlxSuite\dhtmlxConnector_php\temp.log",true);
$schedulerConn->render_sql("SELECT TO_CHAR(STARTTIME,'DD-MM-YYYY H24:MI')
starttime,TO_CHAR(FINISHTIME,'DD-MM-YYYY HH24:MI')finishtime,MODULEID,ROOMID FROM TT_TEST2","SLOTID","STARTTIME,FINISHTIME,MODULEID,ROOMID");
?>
-
-
-
-
-
-
-
-
Events show up in correct places but with only moduleid, no roomid in Internet explorer and in firefox just a blue screen is displayed.
Any help would be much appreciated.
Scheduler expects that 3 first fields will be start, end times and text value, any custom fields can start from 4th position.
Also, you may need to redefine event_text template on the client side, if you have not text property and wont to show some info based on module or room id.
Thanks very much for your help. I did as you suggested but now the calendar doesn’t show any events. I have tried several versions of the event text template but can’t get any to work.
scheduler.templates.event_text=function(start,end,event)
{
return "Module:<b> "+event.text+"</b><br>"+"Subject:<b> "+event.SUBJECT+"</b><br>"+"Type:<b> "+event.TYPE+"</b><br>"+"Room:<b> "+event.ROOM+"</b><br>"+"Lecturer:<b> "+event.NAME;
}
xml data example is shown below
<start_date>
</start_date>
<end_date>
</end_date>
Any help would be much appreciated. Thanks
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan