Here is my query. Everything in it parses fine but not sure why it errors out as I don’t get an actual error code or description.
//add transaction record after update
$e[“on_after_update”] = array(“update_data”, null, true);
Perhaps a typo: INSERTINTO should be INSERT INTO (with a space in between)
Second, instead of passing query to try execute_query function, assign the query string to a variable e.g. $q and call:
$q = “INSERT INTO …. “;
This will push the whole query in error message window for you to debug.
You can also use:
and see php error log file.
Abu Ghufran - Dev Team
Grid 4 PHP Framework
I think that is a paste formatting issue. It isn’t like that in the actual code.
I will try the other suggestions
But there was another sql error that I didn’t notice before thanks to your debugging code! Hopefully this fixes it
Ok so I found the actual issue that I am having. I am trying to insert employee_sak which is set to edit=false as shown below. It is also the first column in my grid. How can I get that value so I can use it in my insert on_update?
$col = array();
$col[“title”] = “Employee Sak”; // caption of column, can use HTML tags too
$col[“name”] = “employee_sak”; // grid column name, same as db field or alias from sql
$col[“show”] = array(“list”=>false, “add”=>false, “edit”=>false “view”=>false, “bulkedit”=>false);
$col[“editable”] = true;
$col[“hidden”] = true;
$col[“hidedlg”] = true;
$cols = $col;
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?