Hi. I have this code:
$col = array();
$col[“title”] = “<center>Soporte</center>”;
$col[“name”] = “Soporte”;
$col[“fixed”] = true;
$col[“width”] = “100”;
$col[“editable”] = true;
$col[“formatter”] = “checkbox”;
$col[“edittype”] = “checkbox”;
$col[“editoptions”] = array(“value”=>”true:false”);
$cols[] = $col;
When press button Save this error appears:
Couldn’t execute query. Data too long for column ‘Soporte’ at row 1…..
UPDATE….Soporte=’false’ WHERE….
The command fails for quote in false word.
The command: UPDATE….Soporte=false WHERE…. (without quotes works)
How i can remove that quotes?
Thank You
Try setting:
$col[“isnum”] = true;
By this it will assume that column does not need quotes for comparison.
Thank you. I tried the indicated thing, but unfortunately it did not work. Is there another alternative? $col = array(); $col[\”title\”] = \”<center>Soporte</center>\”; $col[\”name\”] = \”Soporte\”; $col[\”isnum\”] = true; $col[\”fixed\”] = true; $col[\”width\”] = \”100\”; $col[\”editable\”] = true; $col[\”formatter\”] = \”checkbox\”; $col[\”edittype\”] = \”checkbox\”; $col[\”editoptions\”] = array(\”value\”=>\”true:false\”); $cols[] = $col;
Can you also try by replacing true:false to 1:0
$col[“editoptions”] = array(“value”=>”1:0”);
also check what query is being build after adding isnum.
When press button Save this error appears, the desplegated error is:
Couldn’t execute query. Data too long for column ‘Soporte’ at row 1…..
UPDATE Proyectos SET Soporte=’1’ WHERE Id = 1
with quotes in ‘1’.
I changed the table structure. The column changed from bit to tying(1). It’s works
Thank you