Hi Abu, I have many grids that utilise the dropdown menu when adding a record, these work great. However if I enable auto filter and search on one of the fields with a dropdown it throws a sql error which is confusing me?
For example in the filter field status when I type anything it outputs the below;
Couldn't execute query. Unknown column 'dbo_advisers.ContactFullName' in 'where clause' – SELECT count(*) as c FROM (Select c.client_id, c.Adviser, c.Client, c.DOB, c.Address1, c.Address2, c.Town, c.postcode, c.Phone, c.Email, c.Marketing, l.id, l.Status, l.StatusDate, l.CompDate, l.NPWDate, l.InvalidDate, l.Source, l.MortgageSize, l.MortgageType, l.PropertyValue, l.plan_type, l.provider, l.product, l.LeadDate, l.Cost, l.broker_fee From tbl_lead l Inner Join tbl_clients c On c.client_id = l.client_id WHERE 1=1 AND ( `dbo_advisers`.`ContactFullName` LIKE '%ka%' )) pg_tmp
I then cannot search on any field, just throws this. This happens on all fields with dropdown..
Pastebin http://pastebin.com/r62Epwzk
Thank you
The table dbadvisor is not used in select_command. You cannot use it with dbname unless you make a inner join with that table too.
By looking at your code, it looks like it should be
$col["dbname"] = "c.Adviser";