I get this error when I save a record in the grid:
Couldn’t execute query. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE `CardNo` IN (’57’)’ at line 1 – SELECT * FROM WHERE `CardNo` IN (’57’).
The complete source is as follows:
// set few params
$opt[“caption”] = “People”;
$g->set_options($opt);
// set database table for CRUD operations
// $g->table = “select CardNo,Fullname,Address,Phone from people”;
// query based
$g->select_command =”select CardNo,Fullname,Address,Phone from people”;
$col = array();
$col[“title”] = “Card No”; // caption of column, can use HTML tags too
$col[“name”] = “CardNo”; // grid column name, same as db field or alias from sql
$col[“width”] = “10”; // width on grid
$col[“editable”] = false;
$cols[] = $col;
$col = array();
$col[“title”] = “Name”; // caption of column, can use HTML tags too
$col[“name”] = “Fullname”; // grid column name, same as db field or alias from sql
$col[“width”] = “50”; // width on grid
$col[“editable”] = true;
$cols[] = $col;
$col = array();
$col[“title”] = “Address”; // caption of column, can use HTML tags too
$col[“name”] = “Address”; // grid column name, same as db field or alias from sql
$col[“width”] = “50”; // width on grid
$col[“editable”] = true;
$cols[] = $col;
$col = array();
$col[“title”] = “Phone”; // caption of column, can use HTML tags too
$col[“name”] = “Phone”; // grid column name, same as db field or alias from sql
$col[“width”] = “10”; // width on grid
$col[“editable”] = true;
$cols[] = $col;
// pass the cooked columns to grid
$g->set_columns($cols);
// render grid and get html/js output
$out = $g->render(“list1”);
You need to specify the table property along with select_command to enable the modification operations.

