2
0
forked from Wavyzz/dolibarr

Fix: Bad table name

This commit is contained in:
Laurent Destailleur
2010-10-03 18:49:15 +00:00
parent aa34a9c6dc
commit 33859332ba

View File

@@ -56,10 +56,9 @@ class CommonObject
global $conf; global $conf;
$sql = "SELECT rowid"; $sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX.$this->element; $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
$sql.= " WHERE ref = '".$this->ref."'"; $sql.= " WHERE ref = '".$this->ref."'";
$sql.= " AND entity = ".$conf->entity; $sql.= " AND entity = ".$conf->entity;
dol_syslog("CommonObject::verifyNumRef sql=".$sql, LOG_DEBUG); dol_syslog("CommonObject::verifyNumRef sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
@@ -1229,7 +1228,7 @@ class CommonObject
function getCanvas($id=0,$ref='') function getCanvas($id=0,$ref='')
{ {
global $conf; global $conf;
$ref = trim($ref); $ref = trim($ref);
$sql = "SELECT rowid, canvas"; $sql = "SELECT rowid, canvas";