This topic is locked

inline not working if master detail have 2 record or more

2/4/2011 8:22:21 AM
PHPRunner General questions
I
iyan.dk author

hi,
i have problem with inline edit for master table, if master detail have 2 or more record then inline or edit not working, here is my 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 Old Status,

(select status from progress where id_company=project.id order by date_followup desc limit 1) AS Status,

project.Product,

project.Qty,

project.Amount AS Amount,

(select probability from progress where id_company=project.id order by date_followup desc limit 1) AS Prob (%),

MAX(progress.by_user) AS Update by,

project.user AS Add/Upd-Oleh,

project.quarter,

project.year

FROM project

LEFT OUTER JOIN progress ON project.id = progress.id_company

GROUP BY project.id, progress.id_company
here is the screenshot when I toogle edit inline all, also problem with edit button :


here is sample for master detail, i want get latest date value and put on master table list :


need advise please,
regards

IYAN

I
iyan.dk author 2/16/2011

Hi sergey and jane,
edit and inline edit didnt work if detail table have record 2 or more, maybe this is about complex query,

so the idea is tell event not use standard query, in this case I just need edit master table for field 'customers' and 'qty',
I have try the code before on Edit Page-Before SQL Query, but when click edit button no edit form shown,

can you point me for the the event code for this ?
need your advice



hi,
i have problem with inline edit for master table, if master detail have 2 or more record then inline or edit not working, here is my 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 Old Status,

(select status from progress where id_company=project.id order by date_followup desc limit 1) AS Status,

project.Product,

project.Qty,

project.Amount AS Amount,

(select probability from progress where id_company=project.id order by date_followup desc limit 1) AS Prob (%),

MAX(progress.by_user) AS Update by,

project.user AS Add/Upd-Oleh,

project.quarter,

project.year

FROM project

LEFT OUTER JOIN progress ON project.id = progress.id_company

GROUP BY project.id, progress.id_company
need advise please,
regards

IYAN