Aliased columns on JOIN
This software seems to have a hell of a hard time dealing with aliased columns on a JOIN. I can't get them to show on the grid about half the time, even though my code between php programs is very similar -- just the query part is different.
Example: $g->select_command = "SELECT prim_key, a.file_name , a.sign_date, CONCAT(b.firstname, ' ', b.lastname) AS person FROM vdocs a JOIN vmems b ON b.groupId = a.vendor_id AND b.member_id = a.vdoc_mem_id "
The field "person" will not show up in the grid, even though it looks like pretty simple code to display it. And yeah, it DOES show up in my phpmyadmin when I do a query.
The grid 'definition' is this:
$col = array();
$col["title"] = "Signed By";
$col["name"] = "person"; // grid column name, same as db field or alias
$col["width"] = "40";
$col["editable"] = false;
$col["search"] = false;
$cols = $col;
It doesn't work when I prefix the field with the table name, when I use it as "b.person", when I use it as "person" AND it doesn't even work if I just select 'lastname' and use that in '$col["name"]'. It doesn't show up in the JSON Response, so yeah I see that. But I don't care -- I'm not the one who wrote the JSON; I'm just trying to save time writing reports and I seem to be wasting it instead of saving it.
So what's the deal here? I've had the same issues with almost EVERY OTHER alias I've used with phpgrid. I've poured over the forums and the documentation and nothing I see answers this.