I am trying to do something like this for $scheduler->render_table but it’s not working. Any help appreciated!
$scheduler->render_table("SELECT start_date
, start_date
, event_name
, details
FROM events
LEFT JOIN tblfollowers
ON events.id_user = tblfollowers.username
WHERE events.status ='active'
AND tblfollowers.follower_id = '$test'
UNION
SELECT start_date
, start_date
, event_name
, details
FROM events
WHERE id_user = '$test'","event_id","start_date, start_date,event_name,details")
You can use
$scheduler->render_complex_sql("your sql code");
But beware that it will work for data loading only, it will not be able to auto-save data back to the database.
Thanks for the answer. How would I call this on the html page? Currently, I have it set up this way.
[code]<script type="text/javascript">
/*adding data*/
dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
view: "scheduler",
id: "scheduler"
});
$$("scheduler").load("calevents.php","scheduler");
/*preselects Month view*/
$$("scheduler").$$("month").show();
$$("scheduler").$$("buttons").setValue("month");
});
</script>[/code]
The above code looks correct
On client side the loading always done in the same way
$$("scheduler").load("calevents.php","scheduler");
It doesn’t related to the render command on server side ( but be sure to user SchedulerConnector on server side, as second parameter of load command configures client side for data in scheduler’s format )
Still not working. sigh! I checked my schedulerconnector and baseconnector file and they look fine. This is how I wrote the query.
$scheduler->render_complex_sql("SELECT start_date
, start_date
, event_name
, details
FROM events
LEFT JOIN tblfollowers
ON events.id_user = tblfollowers.username
WHERE events.status ='active'
AND tblfollowers.follower_id = '$test'
UNION
SELECT start_date
, start_date
, event_name
, details
FROM events
WHERE id_user = '$test'","event_id","start_date, start_date,event_name,details");
You are selecting start_date two times
SELECT start_date
, start_date
Is it correct ?
You can try to
- open data feed directly in browser and check does it generate valid xml data or not
- enable logging for connector and check its output
docs.dhtmlx.com/doku.php?id=dhtm … tor:errors
Thank you very much for all your help. There was a problem with scheduler_connector.php The advice to check that file really sparked everything. Thanks again.