Hi,
I want to update some child tables along with the event updation. How can i render my own query as updation SQL; How can handle event update and delete separately? Here i am attaching my code
if ($scheduler->is_select_mode()){ // ’ code for loading data
$SQL = "SELECT… ";
$scheduler->render_sql($SQL,“id”,“field1,field2,field3,field4,field5,field6”, “”, “”);
}
else { // code for other operations - i.e. update/insert/delete
$scheduler->render_table(“tableName”,“field1,field2,field3,field4,field5,field6”);
}
In the else part i am handling both update and delete together, actually i want to retrieve data from child table after updation. How can i do that? Please reply as soon as possible.
Actually update code is working, but after update the content is not populating correctly. Actually the update table got the foreign key which is get updated while drag n drop. I need to get the details with updated foreign key value.But only after refresh i can get that changes. What will be the problem? Please reply as soon as possible. I cant figure out what the actual issue yet now.
if ($scheduler->is_select_mode()){ //then ’ code for loading data
$SQL = “”;
$scheduler->render_sql($SQL,“apmt_id”,“apmt_start_time,apmt_end_time,label,apmt_status,apmt_operatory_id,apmt_prov_id”, “”, “”);
}
else { //code for other operations - i.e. update/insert/delete
$scheduler->render_table(“tablename”,“apmt_id”,“apmt_start_time,apmt_end_time,apmt_operatory_id,apmt_prov_id”);
}
I hope the issue is with server side code because i cant see any query to retrieve data from operatory master table after updation. Please reply asap.
else { //code for other operations - i.e. update/insert/delete
$scheduler->event->attach("onAfterUpdate",function($action){
$action->set_response_attribute("mydata", SOME_VALUE);
});
$scheduler->render_table("tablename","apmt_id","apmt_start_time,apmt_end_time,apmt_operatory_id,apmt_prov_id");
}
Where SOME_VALUE - value which you want to send , back to client side.
And on client side you can use the code which is described by above link, to retrieve value from server and update event in question with it.
apmt_operatory_id is get updated while drag n drop, i want to get operatory name from operatory master table using updated apmt_operatory_id get updated on drag n drop…
I hope you got the scenario? Sorry for my bad english
mydata - just an unique name, will be reused on client side to get the value by the same name
want to get operatory name from operatory master table using
Connector itself can’t provide such info, you need to use custom sql request to fetch such data from DB
// I hope this else part working after drag and drop. Here the apmt_operatory_id get updated on drag n drop but its corresponding values is not getting from child table. I can see clearly that custom SQL statemement to fetch data after updation is not here. Please explain in detail, how can i do this? I am almost in last stage of customization, this is the only issue yet now i cant figured out. So please help Stanislav.