How to have a sub select in Field::inst() ?
How to have a sub select in Field::inst() ?

Hi, I have this sub select, he work fine but is too long for 'Field::inst'
What is the method for correct this ?
Field::inst("(SELECT count(*) FROM llx_commandedet as cd LEFT JOIN llx_commande as c ON c.rowid = cd.fk_commande LEFT JOIN llx_commandedet_extrafields as cde ON cd.rowid = cde.fk_object LEFT JOIN llx_commande_extrafields as ce ON ce.fk_object = c.rowid WHERE cde.fk_statut = 3 ) as stock_clientele"), //AND cd.fk_product=fk_product AND ce.fk_point_relais=fk_soc
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Currently the only way to handle this in Editor is to use a VIEW.
Allan