saving with render_sql

Hi there,

   I'm trying to implement a filter on my scheduler so that people who are not subscribed to an event won't see the event on the calendar. As such, I'm trying to use the method:
$scheduler->render_sql();

Here’s the code I use to make my events show up and it works:

[code]$mainSQL = "SELECT * FROM tblpmtodo INNER JOIN tblpmdestinatairespermissions on tblpmtodo.TodoId = tblpmdestinatairespermissions.TodoId WHERE tblpmdestinatairespermissions.NoPersonne = " . $_SESSION[‘Employe’];

$scheduler->render_sql($mainSQL, “TodoId”, “StartDateTime,EndDateTime,Etiquette,Description,Titre,ANoPersonne,NoClient,NoDivision,PrcComplete,Priorite,CalendrierStrategique,StatutId”);[/code]

However, now when I try to modify the events, the changes aren’t saved. The text on the label of the calendar stays bold and nothing happens. I use this to save the main data:

scheduler.endLightbox(true, html("my_form"));

I suspect that because I’m now using the render_sql instead of the render_table method, the scheduler no longer knows in which table to insert the data. I say this because if I change the call to render_table instead of render_sql, everything works perfectly.

So all I want to know is how to get my events to save properly once again.

Osu

I suspect that because I’m now using the render_sql instead of the render_table method, the scheduler no longer knows in which table to insert
Yep, this is correct.

Check
docs.dhtmlx.com/doku.php?id=dhtm … ex_updates

Basically - you can define the logic, which will be used for CRUD operations.

Ah “crud” I should have seen that one… okay that was a stupid pun, sorry :wink:. Anyway, thanks for the answer :slight_smile: