Database API
Database Functions
There are some helper functions to query the connected database. Considering you have $g as jqgrid object:
// executes the supplied sql (insert, update, delete)
$g->execute_query($sql,$data);
// executes the select query and return first result
$g->get_one($sql,$data);
// executes the select query and return all results as an array
$g->get_all($sql,$data);
These functions will execute the supplied query passed in $sql.
$data is an optional param of array with key value pair, to be used in named parameter of sql query.