2
0
forked from Wavyzz/dolibarr

Optimized memory used by database handlers

This commit is contained in:
Laurent Destailleur
2008-09-05 23:49:40 +00:00
parent 76ca030ec4
commit 956f530ae2
3 changed files with 6 additions and 6 deletions

View File

@@ -634,9 +634,9 @@ class DoliDb
1451 => 'DB_ERROR_CHILD_EXISTS' 1451 => 'DB_ERROR_CHILD_EXISTS'
); );
if (isset($this->errorcode_map[$this->lasterrno])) if (isset($errorcode_map[$this->lasterrno]))
{ {
return $this->errorcode_map[$this->lasterrno]; return $errorcode_map[$this->lasterrno];
} }
$errno=$this->lasterrno; $errno=$this->lasterrno;
return ($errno?'DB_ERROR_'.$errno:'0'); return ($errno?'DB_ERROR_'.$errno:'0');

View File

@@ -615,9 +615,9 @@ class DoliDb
1451 => 'DB_ERROR_CHILD_EXISTS' 1451 => 'DB_ERROR_CHILD_EXISTS'
); );
if (isset($this->errorcode_map[mysql_errno($this->db)])) if (isset($errorcode_map[mysql_errno($this->db)]))
{ {
return $this->errorcode_map[mysql_errno($this->db)]; return $errorcode_map[mysql_errno($this->db)];
} }
$errno=mysql_errno($this->db); $errno=mysql_errno($this->db);
return ($errno?'DB_ERROR_'.$errno:'0'); return ($errno?'DB_ERROR_'.$errno:'0');

View File

@@ -632,9 +632,9 @@ class DoliDb
1451 => 'DB_ERROR_CHILD_EXISTS' 1451 => 'DB_ERROR_CHILD_EXISTS'
); );
if (isset($this->errorcode_map[mysqli_errno($this->db)])) if (isset($errorcode_map[mysqli_errno($this->db)]))
{ {
return $this->errorcode_map[mysqli_errno($this->db)]; return $errorcode_map[mysqli_errno($this->db)];
} }
$errno=mysqli_errno($this->db); $errno=mysqli_errno($this->db);
return ($errno?'DB_ERROR_'.$errno:'0'); return ($errno?'DB_ERROR_'.$errno:'0');