DHTMLX-Scheduler-Data load from database but not displayed

Hello,

I’m trying to display the only event I have in my database in the scheduler.
The php connector on the server-side seems to retreive the event I created but the scheduler doesn’t display it.
Instead, I have a javascript alert that displays the data in XML format from the database.

Here is the code :
HTML:

How to start html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
 
 

PHP:

<?php require_once("scheduler/connector/scheduler_connector.php"); $res=mysql_connect("localhost","root",""); mysql_select_db("test"); $conn = new SchedulerConnector($res); $conn->enable_log("path"); $conn->render_table("events","id","start_date,end_date,text"); Any help is appreciated.

Hello,
the code seems correct.
Note that default connector samples uses “%Y-%m-%d %H:%i”, instead of “%Y-%m-%d %H:%i:%s” date format. However i’m not sure that it could be the problem. Can you attach a demo (html page with scheduler, php with connector and an sql dump of the events table) so we could reproduce the problem?

Hello,

Thanks for your answer. I decided to use this date format because my database (mysql) uses this date format.

I looked on the internet but I couldn’t find any demo that allows a complete web development environment. Instead I give you a zip file that contains the html scheduler, php connector and an export of my database table in xml.
Demo.7z (370 KB)

Your php file has a whitespace before opening <?php tag, it breaks the xml response. The attached version should work correctly. You can also use a JSON version of the connector, it wouldn’t have had such issues
Connector.zip (304 Bytes)

Thanks this was the problem it works perfectly right now ! Thank you very much.
And yes I’ll use a JSON version of the connector.