Timeline view problem

Hello! :slight_smile:
I just started to develop application in which I need include timetable for job Shifts(user support 24/7).
So dhtmlxscheduler timeline view perfuctly suits for this clear task. But I faced problem - as I understand from documentation, timeline view is just presentation of main functionality and events (in my case shifts) cuold be loaded from mysql database. I tried standart sample

it works fine, then I have added timeline view to tabs and tested again, it added new event to table and event appeared in mysql table(events) and on another tabs (day,week,month) and stay there after page refresh but disappeared from timeline view :frowning: Actually I need ONLY timeline view. Which table should I render and how affect and save changes in timeline view? I havent found this samples in documentation. It seems to be something simple… Please help :slight_smile:

Hello,

Every view’s main functionality is to display events in a convenient form. Events could be loaded from various sources - database (not limited to mysql), ical, xml, json.

In case of timeline each event must have additional field it is mapped to - resource id (that’s explanation, not actual name as it is configurable). Scheduler need to answer the question which events should I draw on the first line? Oh, ones with the section_id = 5, for example. If you just added timeline tab to 05_mysql sample then that table is missing and not storing that additional property.
Be sure to check scheduler\samples\06_timeline\04_tree_db.html sample.

Kind regards,
Ilya

Hello,
Thank you for you answer. I have got your points. But I have tried scheduler\samples\06_timeline\04_tree_db.html sample - it gave the same result. I can modify existing events and it stores to db table ( timetable.events_tt ), but all new events disappeared after page reload it does not write this events to db , works only client-side functionality, my db is running and acceptable, besides it could read/load/modify existing events, that is why I think it is not db issue. And I even did not change default sample, only local connection properties. Any ideas? :slight_smile:

Hello,

Uncomment following line in the events_tree_db.php file:

//$scheduler->enable_log("log.txt",true);

Then try saving event and check the log, is the a problem there?

Kind regards,
Ilya

Done. Here log

In connector’s configuration you are using section2_id field, but you don’t have it in the scheduler’s lightbox, so for new events it is empty - maybe it causes some problem on DB level?

Try to run the next query against DB

INSERT INTO events_tt(start_date,end_date,event_name,details,section_id,section2_id) VALUES (‘2009-06-30 13:30’,‘2009-06-30 16:00’,‘Test Julia’,’’,‘40’,’’)

As for me - it looks valid.