I am using following PHP class to display records. I also want to open another webpage when a row is selected according to a column value. This class is doing everything fine when this line is like:
$x->setQuery("*", "people");
If instead of *, I define columns like:
$x->setQuery("fname,lname,age", "people");
it stops identifying the clicked row id. Can someone help me out?
http://www.eyesis.ca/projects/datagrid.html
Please check the Example: 4 demo and source supplied there.
I’m not really familiar with this library, but I’ve had a peek at the source. I think you need to include the id column in the list of columns you pass to setQuery. You’d probably have the best results calling it like this:
You could also try leaving it out of the first list, but still passing it as the third parameter which specifies the primary key.