Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Preston on Aug 10, 2009 06:56
open dhtmlx forum
dhtmlxscheduler database units

Hi, I am attempting to use the Units page with a database. Currently the scheduler writes the dates, times and details correctly but I am unable to get it to store the section_id.

Do I have to modify or write my own php to do this or have I missed a setting? I expect if I added section_id as one of the optional fields it would be read and written.

$scheduler->render_table("booking","idbooking","dateStart,dateEnd,event_text","section_id");

Thanks,
Preston
Answer posted by Support on Aug 10, 2009 07:22
You need to use

$scheduler->render_table("booking","idbooking","dateStart,dateEnd,event_text,section_id");

3rd parameters - DB fields which will be loaded to client side and saved back to DB
4th parameter - optional fields, they will present during DB operations, but will not be loaded to client, nor used in saving.

4th parameters can be used if you need some additional data to customize loading|saving process, but need not show data to client or need to be sure that user will not be able to change related data in DB. 
Answer posted by Preston on Aug 10, 2009 07:51
Thanks, I had tried that but nothing at all displayed.  Turns out I had one of the section_id's set to 0 in the database which stopped them all being loaded.