From 2116314871e4f4bbcb5aea67c455b87595f8e9da Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 22 Jan 2020 19:03:09 +0100 Subject: Rev: 4599 --- mayor-orig/mayor-base/www/include/base/mysql.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mayor-orig/mayor-base/www/include') diff --git a/mayor-orig/mayor-base/www/include/base/mysql.php b/mayor-orig/mayor-base/www/include/base/mysql.php index 4bc49d16..e5e4a2e3 100644 --- a/mayor-orig/mayor-base/www/include/base/mysql.php +++ b/mayor-orig/mayor-base/www/include/base/mysql.php @@ -193,10 +193,13 @@ ) $_SESSION['alert'][] = 'message:lehet hiba?:db_query/'.$SET['fv'].':'.$SET['modul'].':'.$q_pattern; if ($SET['log']===true) mayorLogger(10,'mysql',$q,_USERACCOUNT); - if (MYSQLI_ENABLED===true) + if (MYSQLI_ENABLED===true) { $r = mysqli_query($lr,$q); - else + $_insert_id = mysqli_insert_id($lr); // itt lekérdezzük, hogy a warning lekérdezés ne rontsa el debug=true esetén!! + } else { $r = @mysql_query($q, $lr); + $_insert_id = mysql_insert_id($lr); + } define(MYSQL_LOGGER,false); if (MYSQL_LOGGER === true) { $filename = '/tmp/mysql.log'; @@ -283,7 +286,7 @@ break; } } elseif ($SET['result'] == 'insert' && (substr(strtolower($q),0,6) == 'insert' || substr(strtolower($q),0,7) == 'replace')) { - $RESULT = mysqli_insert_id($lr); + $RESULT = $_insert_id; // mysqli_insert_id($lr); - ez itt már elromlik debug=true esetén a warning lekérdezés miatt mayorLogger(1,'mysql',$q,_USERACCOUNT); } elseif ($SET['result'] == 'affected rows') { $RESULT = mysqli_affected_rows($lr); @@ -327,7 +330,7 @@ break; } } elseif ($SET['result'] == 'insert' && (substr(strtolower($q),0,6) == 'insert' || substr(strtolower($q),0,7) == 'replace')) { - $RESULT = mysql_insert_id($lr); + $RESULT = $_insert_id; // mysql_insert_id($lr); - ez itt már elromlik debug=true esetén a warning lekérdezés miatt mayorLogger(1,'mysql',$q,_USERACCOUNT); } elseif ($SET['result'] == 'affected rows') { $RESULT = mysql_affected_rows($lr); -- cgit v1.2.3