correction for fetch sql
This commit is contained in:
parent
2820bd24ac
commit
1f31ff338c
@ -341,9 +341,9 @@ class ActionComm extends CommonObject
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id ";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||
$sql.= " WHERE a.fk_action=c.id";
|
||||
if ($ref) $sql.= " AND a.id=".$ref; // No field ref, we use id
|
||||
else $sql.= " AND a.id=".$id;
|
||||
$sql.= " WHERE ";
|
||||
if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id
|
||||
else $sql.= " a.id=".$id;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user