diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c324b2502c9..a392fd793d5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8532,7 +8532,7 @@ abstract class CommonObject $objectline = new $objectlineclassname($this->db); $sql = 'SELECT '.$objectline->getFieldList('l'); - $sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element; + $sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element.' as l'; $sql .= ' WHERE l.fk_'.$this->element.' = '.$this->id; if ($morewhere) { $sql .= $morewhere;