Hello Abu,
This code is not working for me, is there anything problem with this:
function add_client($data)
{
$check_sql = “SELECT count(*) as c from clients where statusid = 4”;
$rs = mysql_fetch_assoc(mysql_query($check_sql));
if ($rs[“c”] > 0)
phpgrid_error(“Status already exist in database”);
mysql_query(“INSERT INTO clients VALUES (null,'{$data[“params”][“name”]}’,'{$data[“params”][“gender”]}’,'{$data[“params”][“company”]}’)”);
}
1 Answers
Hello,
mysql_* funtions are deprecated in php 5.5+
You should replace it with mysqli functions by referring php docs. Or
Use datagrid db layer functions to call database.
https://www.phpgrid.org/demo//demos/editing/custom-events.phps
http://www.phpgrid.org/docs/grid-events/
Events are supported in full version.
Your Answer