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:
@@ -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;
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user