$e["on_insert"] = array("add_master", null, true);
$e["on_delete"] = array("delete_master", null, true);
//$id = intval($_GET["rowid"]);
//$comp_id = $_GET["comp_id"];
//$data["params"]["branch_id"] = $id; IT WORKS
$data["params"]["comp_id"] = $_SESSION['comp_id']; IT WORKS
phpgrid_error ($data["params"]["branch_name"]);IT WORKS
$check_sql = "SELECT count(*) as c from employee where branch_id = '".$data["params"]["id"]."'";
$rs = mysql_fetch_assoc(mysql_query($check_sql));
I need to get this value in the last line on delete function. but it shows blank instead of value. What is wrong with the code?
Current api only passes ROW ID in on_delete callback function.
If you need other data, you can run another select query and fetch the recordset using passed row id.
Thanks for your response.
I hope this rowid is for the same grid for which we are using on delete function?
I tried to get rowid on delete but it shows blank.
Suppose, you first column name is 'client_id' then you will use $data["client_id"] in on_delete handler to get row id.
Row id is first column value.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?