1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

MySQL: Fix for DUPLICATE KEY UPDATE return values when NOT using PDO.

This commit is contained in:
Cameron
2016-08-17 15:23:33 -07:00
parent 98c4c3e1d0
commit 64b9cb9f2b
2 changed files with 8 additions and 3 deletions

View File

@@ -880,7 +880,7 @@ class e_admin_log
} }
elseif(getperms('0') && E107_DEBUG_LEVEL > 0) 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; return false;

View File

@@ -949,11 +949,16 @@ class e_db_mysql
{ {
$result = false; // ie. there was an error. $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(); $result = $this->lastInsertId();
} }
elseif($this->mySQLresult === 2) // updated elseif($this->mySQLresult === 2 || $this->mySQLresult === true) // updated
{ {
$result = true; $result = true;
} }