How to use mysql_fetch_assoc(mysql_query($check_sql))
to fetch data from the db2 database
You can call,
$result = $g->execute_query($sql);
$arr = $result->GetRows();
It uses adodb for php and $result is recordset object. Refer documentation of adodb for more help.
http://phplens.com/lens/adodb/docs-adodb.htm
Hello, this code i pick from one of your examples, but not work to me, i think is cause you use mysql_query instead mysqli_query, can you show me how is with mysqli_query mode. thanks
$check_sql = "SELECT count(*) as c from clients where LOWER(`name`) = '".strtolower($data["params"]["name"])."'";
$rs = mysql_fetch_assoc(mysql_query($check_sql));
If using latest build, you can use this code:
http://www.phpgrid.org/demo/demos/editing/server-validation.phps
Otherwise, you can use above inside callback function, where $g is new jqgrid()
global $g;
$result = $g->execute_query($check_sql );
$rs = $result->GetRows();