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

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

WININFOWININFO Posts: 19Questions: 2Answers: 0

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

Answers

  • allanallan Posts: 61,710Questions: 1Answers: 10,103 Site admin
    Answer ✓

    Hi,

    Currently the only way to handle this in Editor is to use a VIEW.

    Allan

This discussion has been closed.