Fix: Bad request

This commit is contained in:
Laurent Destailleur
2009-10-28 23:07:54 +00:00
parent 506ac48225
commit 7a853e0408

View File

@@ -838,7 +838,7 @@ class CommonObject
$sql = 'SELECT sourceid, sourcetype, targetid, targettype';
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_element';
$sql.= " WHERE (sourceid = '".$this->id."' AND sourcetype = 'invoice')";
$sql.= " OR (targetid = '".$this->id."' AND targetid = 'invoice')";
$sql.= " OR (targetid = '".$this->id."' AND targettype = 'invoice')";
dol_syslog("CommonObject::load_object_linked sql=".$sql);
$resql = $this->db->query($sql);
if ($resql)