Hello
I new on phpgrid, but I am haveing an error on on_update,
Code is.. am im using master detail sub grid sample, with some mod. for test.
I try , forceing the value , but I am getting a red line when press save
Thanks
$g->set_options($grid);
$e["on_update"] = array("update_client", null, true);
$g->set_events($e);
function update_client($data)
{
$str = "UPDATE invheader set total=(select sum(qty*unit) from invlines where id = {$data["id"]} ) WHERE id = {$data["id"]};";
//$str = "UPDATE invheader set total=1 WHERE id = {$data["id"]};";
// echo $str;
$mysql_query($str);
// echo $str;
// continue normal grid update … by grid lib
}
Perhaps, there is a typo …
$mysql_query($str); should be …
mysql_query($str);
(without $ sign)
You can put echo statements inside on_update callback and see output in firebug ajax response.
Review this tutorial for '[debugging with firebug](https://phpgrid.desk.com/customer/portal/articles/926266)'.