|
|
romaldus 1/28/2011 |
|
hi, i have problem with "edit form" with my query (its working well for list/add, inline add/edit) the error when klik edit buton : Error description : Invalid use of group function Error file : /opt/lampp/htdocs/avira/include/dbconnection.php SQL query : SELECT project.id, project.CUSTOMERS as Customers, project.RESELLER as Reseller, project.LEAD_SOURCE as Lead Source, project.TYPE_OF_BUSINESS as Type of Buss., project.SECTOR as Sector, project.STATUS as Status, project.Product, project.Qty, project.Amount as Amount, MAX(progress.probability) as Prob (%), project.user, project.quarter, MIN(progress.by_user) as Update By FROM project LEFT OUTER JOIN progress ON project.id = progress.id_company WHERE (MIN(progress.by_user)<'28.01.2011 09:37-jaka' or MIN(progress.by_user) IS NULL ) GROUP BY project.id,project.CUSTOMERS,project.RESELLER,project.LEAD_SOURCE,project.TYPE_OF_BUSINESS,project.SECTOR,project.STATUS,project.Product,project.Qty,project.Amount,project.user,project.quarter ORDER BY 14 DESC limit 1------------------------------------------ here is my query from SQL Designer : select project.id, project.customers as customers, project.reseller as reseller, project.lead_source as lead source,project.type_of_business as type of buss.,project.sector as sector, project.status as status, project.product, project.qty, project.amount as amount, max(progress.probability) as prob (%),max(progress.by_user) as update by,project. user,project.quarter from project left outer join progress on project.id = progress.id_company group by project.id, project.customers, project.reseller, project.lead_source, project.type_of_business, project.sector, project.status, project.product, project.qty, project.amount, project. user, project.quartersample data for table progress.by_user = "12.01.2011 23:01-michael" I used "MAX(progress.by_user) to query latest value and appear it on project listing, look this is the problem? regards
group by project.id, project.customers, project.reseller, project.lead_source, project.type_of_business, project.sector, project.status, project.product, project.qty, project.amount, project.`user`, project.quarter
group by project.id |
|
|
I
|
iyan.dk author 1/28/2011 |
|
hi Romaldus |
|
|
|
Sergey Kornilov admin 1/28/2011 |
|
IYAN, |
|
|
I
|
iyan.dk author 1/28/2011 |
|
Hi Sergey IYAN, just in case - do you use 'Next'/'Prev' buttons on the Edit page? This feature is not compatible with some complex queries. You may want to turn it off. |
|
|
|
Sergey Kornilov admin 1/28/2011 |
|
You can turn off Next/Prev buttons on 'Miscellaneous' screen in PHPRunner. That should fix the issue. |
|
|
I
|
iyan.dk author 1/29/2011 |
|
Hi Sergey You can turn off Next/Prev buttons on 'Miscellaneous' screen in PHPRunner. That should fix the issue. |
|