how can i load and save data from mysql with dhtmlscheduler

Hello guys,

I have been playing with dhtmlxscheduler, it is a great product… Im expec that you can help me to interact mysql db with dhtmlxscheduler in the case to update and inserting data in scheduler.
please help me. I use php language

The package contains ready sample for such use-case

dhtmlxScheduler\samples\01_initialization_loading\05_loading_mysql.html
main\dhtmlxScheduler\samples\01_initialization_loading\php\events.php

Basically, for your custom calendar, you need only change table name and connection settings in events.php

thanks a lot.it’s work

Sorry, for bring back and old topic (I did it to prevent reposting)

Can you provide examples of how to save data or obtain data from the scheduler without using the connector?

Which server side language you plan to use?

In common case you can use one of next two strategies

a) attach custom logic to handlers of scheduler, and fire your custom code for add|edit|delete operations

b) you can serialize data back to xml|json and save it on server side
samples\04_export\01_serialize_xml.html

Hi, thanks for the quick answer.

I’m using PHP (in cakephp framework) for my server side logic, I have no problems in the data loading, but the save has become a little dificult due the implementation of the recurring events option.

The xml serialization seems a nice option, but (an advanced apology :blush: ) exist a way to load data to the scheduler via xml (because the data management to form the xml passes a lot o checks to customize the events) and save the data via the phpConnector?

Thanks!

Hello,

To load data from xml you can use:

scheduler.load("../your/url.xml");

To use dataprocessor to save/update events:

var dp = new dataProcessor("php/events.php"); dp.init(scheduler);
And if you want to use connector but not dataprocessor then you to form, send (to the same url) and then handle xml yourself.

Kind regards,
Ilya

Thanks!
That worked perfectly fine, again thanks!

Best regards.