Complex SQL

fsebbah

New Member
Hi,
I have a complex query SQL. I would like show the list of employee and I use a plugin database_join.
The query :
"SELECT com.cb_matricule,concat(com.lastname,' ' , com.firstname) --> It's ok for me
from jos_organigram_entities parent, jos_comprofiler com
LEFT OUTER JOIN jos_organigram_entities child ON child.item_id= com.id AND child.type_id = '12'
LEFT OUTER JOIN jos_joomrh_agreement_employment_type type ON com.cb_metier = type.id
WHERE com.lastname IS NOT NULL
AND parent.id = '244'
AND child.lft > parent.lft
AND child.rgt < parent.rgt
ORDER BY com.lastname ASC, com.firstname ASC, child.level ASC;" --> I believe it's possible to integrate this in the box : "Additional join statements"

The problem Where can fill the name of the table : jos_organigram_entities parent ?
Any help is appreciated
Thanks,
Franck
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top