From 7df32abae4ea7b628a8eb7b0de0ce524b8df5ea9 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 10 Dec 2012 14:58:05 +0000 Subject: [PATCH] i2012-12-10 Miguel de Dios * db/mysql.php: finish to fixed the insert in the metaconsoles. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7245 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 4 ++++ pandora_console/include/db/mysql.php | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ed7c8de039..1e447a1514 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2012-12-10 Miguel de Dios + + * db/mysql.php: finish to fixed the insert in the metaconsoles. + 2012-12-10 Sergio Martin * pandoradb.sql diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 03447a8c6e..6aea2b1000 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -287,7 +287,7 @@ function mysql_db_process_sql($sql, $rettype = "affected_rows", $dbconnection = $backtrace = debug_backtrace (); $error = sprintf ('%s (\'%s\') in %s on line %d', mysql_error (), $sql, $backtrace[0]['file'], $backtrace[0]['line']); - db_add_database_debug_trace ($sql, mysql_error ()); + db_add_database_debug_trace ($sql, mysql_error ($dbconnection)); set_error_handler ('db_sql_error_handler'); trigger_error ($error); restore_error_handler (); @@ -295,21 +295,21 @@ function mysql_db_process_sql($sql, $rettype = "affected_rows", $dbconnection = } elseif ($result === true) { if ($rettype == "insert_id") { - $result = mysql_insert_id (); + $result = mysql_insert_id ($dbconnection); } elseif ($rettype == "info") { - $result = mysql_info (); + $result = mysql_info ($dbconnection); } else { - $result = mysql_affected_rows (); + $result = mysql_affected_rows ($dbconnection); } - db_add_database_debug_trace ($sql, $result, mysql_affected_rows (), + db_add_database_debug_trace ($sql, $result, mysql_affected_rows ($dbconnection), array ('time' => $time)); return $result; } else { - db_add_database_debug_trace ($sql, 0, mysql_affected_rows (), + db_add_database_debug_trace ($sql, 0, mysql_affected_rows ($dbconnection), array ('time' => $time)); while ($row = mysql_fetch_assoc ($result)) { array_push ($retval, $row);