Fix sql error

This commit is contained in:
Laurent Destailleur 2021-09-17 19:16:46 +02:00
parent 446cc082e2
commit 7ed9e21266

View File

@ -822,8 +822,7 @@ class FormTicket
$stringtoprint .= '<select id ="'.$htmlname.'_child_'.$levelid.'" class="maxwidth500 minwidth400 groupticketchild" child_id="'.$levelid.'">';
$stringtoprint .= '<option value="">&nbsp;</option>';
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ctcjoin.code as codefather, ";
//$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ctcjoin.code as codefather";
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
$sql .= " JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctcjoin ON ctc.fk_parent = ctcjoin.rowid";
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);