Hi all
Im having a problem, i have a grid with this query:
$g->select_command = "select * from (SELECT groupid,client, vat,vatcountry,adrcity, SUM(balance)
FROM (
SELECT groupid,client,vat,vatcountry,adrcity, balance FROM CLIENTS_CLIENTS where credit='Yes'
UNION SELECT groupid,client,vat,vatcountry,adrcity,value FROM MONEY_IN
) t
GROUP BY t.client) as o";
My problem is i cant autofilter or search allways receive an error, how can i solve this?
Thank you again
Really good work on this grid
Please email me database sql and testing data for generating case.
You can email at [email protected]
Hi Abu,
I am experiencing a similar problem
Everything works great until I try to use the filter.
Here is a link to an example.
http://websalesdesign.com/proj/lib/phpgrid-full/index.php
I paired down the calc-column example so there are only 3 fields with the below query.
I used dbname for all fields.
$col["dbname"] = "c.name";
$g->select_command = "SELECT c.name, c.client_id, ii.invcount FROM clients c left outer join (select client_id cid, count(*) invcount from invheader group by cid) ii ON ii.cid = c.client_id";
It gives the following error.
Couldn't execute query. Unknown column 'c.name' in 'where clause' – SELECT count(*) as c FROM (SELECT c.name, c.client_id, ii.invcount FROM clients c left outer join (select client_id cid, count(*) invcount from invheader WHERE 1=1 AND ( `c`.`name` LIKE '%z%' ) group by cid) ii ON ii.cid = c.client_id) pg_tmp
Regards,
Glenn
Hello. I have a similar problem. Concat use to join two fields in a query. This column is called "description". This field is used in the grid, but when writing a filter expression I get the error: Could not execute query. Unknown column 'description' in 'where clause'. Would have to update the lib too? Please could you send it to me? Thank you!!