I’m developing a Grid where the master appears in the top, always visible, while each one of the detail grids in one different tab.
Everything was working fine, but when i added the third detail grid, i get a pop-up with the following error. This pop-up opens whenever I select any row on the Master grid:
“Couldn’t execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) pg_tmp’ at line 1 – SELECT count(*) as c FROM () pg_tmp”
The code of the third grid (the grid that i think is creating this issue) starts like this:
$grid2->select_command = “SELECT DISTINCT t.idA FROM tableR t WHERE t.idB = $id”;
I also tried to change the second line to:
$grid2->select_command = “SELECT DISTINCT t.idA FROM tableR t WHERE t.idB IN ($id)”;
I already tried the SQL query on phpmyadmin and it’s working fine.
Thanks in advance.
Please make sure you added ->table property as well along with ->select_command property.
It is required for grid to process some logic internally.
Abu Ghufran - Dev Team
Grid 4 PHP Framework
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?