mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
MySQL: Fix for DUPLICATE KEY UPDATE return values when NOT using PDO.
This commit is contained in:
parent
98c4c3e1d0
commit
64b9cb9f2b
@ -880,7 +880,7 @@ class e_admin_log
|
||||
}
|
||||
elseif(getperms('0') && E107_DEBUG_LEVEL > 0)
|
||||
{
|
||||
echo "Could Save to Log File: ".$fileName;
|
||||
e107::getMessage()->addDebug("Couldn't Save to Log File: ".$fileName);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -949,11 +949,16 @@ class e_db_mysql
|
||||
{
|
||||
$result = false; // ie. there was an error.
|
||||
|
||||
if($this->mySQLresult === 1) // insert.
|
||||
if($this->pdo !== true)
|
||||
{
|
||||
$this->mySQLresult = mysql_affected_rows($this->mySQLaccess);
|
||||
}
|
||||
|
||||
if($this->mySQLresult === 1 ) // insert.
|
||||
{
|
||||
$result = $this->lastInsertId();
|
||||
}
|
||||
elseif($this->mySQLresult === 2) // updated
|
||||
elseif($this->mySQLresult === 2 || $this->mySQLresult === true) // updated
|
||||
{
|
||||
$result = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user