I have a situation where I have to list 2 grids on the same page: the first is showing all the data from the table with no edit/add/delete options. The 2nd table will show data only for the logged user and the grid has options for add/edit/delete records. Both grids are using the same database and the same table.
The logged username is being passed through $username=$_SESSION['username'] and the variable $username is being used in the SQL query. The problem is that the first SQL select seems to remain persistent and the second one will not work.
If the first sql select is $g->select_command = "SELECT * FROM tbl_name"; the second sql select ($g->select_command = "SELECT * FROM tbl_name WHERE username='$username'"; will not work and both grids show the same records.
Renaming $g to $g1 and using it in SQL select makes no difference.
PS: subgrid option is available only in paid version?
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!