Once updated, save back to mySQL

Hi,

Sorry if this is a commonly asked question, I did search a bit before posting! Honest!

I’m building a scheduler for our work and I’ve managed to link the calendar through the mysql connector. And i’m getting a bit ahead of my skills now, I can’t fathom out for the life of me how to when you edit the item through the calendar. For example drag it to a different day, make that update the mysql table it’s taken the information from, so when the calendar re-loads the information is back where it used to be!

Can anyone point me in the right direction?

Thanks a lot, it’s really appreciated.

Tom

samples\01_initialization_loading\05_loading_mysql.html

add next two line to scheduler’s init

var dp = new dataProcessor("php/events.php"); dp.init(scheduler);

where php/events.php need to be replaced with the same path as you are using for data loading

Ah mate, you’re a lifesaver.

Thanks a lot, really works well :slight_smile:

Just another quick one, that worked fine. However now i’ve changed it to be the calendar with reccuring, when ever i update an item on the calendar it wipes the table in the database?

Any suggestions, I did change the ID field in the database from an int to a varchar to use my own ID numbers, but I can’t see that doing it?

Tom

Scheduler expects that server side will provide unique IDs, the ones which generated on client side based on current timestamp and may be not unique enough. So be sure that you are providing some logic for new ID generation.

Also, check
dhtmlxScheduler\samples\03_extensions\php\events_rec.php
backend code for recurring events need to have some extra configuration.