i2012-12-10 Miguel de Dios <miguel.dedios@artica.es>

* 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
This commit is contained in:
mdtrooper 2012-12-10 14:58:05 +00:00
parent b6f9867ef0
commit 7df32abae4
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2012-12-10 Miguel de Dios <miguel.dedios@artica.es>
* db/mysql.php: finish to fixed the insert in the metaconsoles.
2012-12-10 Sergio Martin <sergio.martin@artica.es>
* pandoradb.sql

View File

@ -287,7 +287,7 @@ function mysql_db_process_sql($sql, $rettype = "affected_rows", $dbconnection =
$backtrace = debug_backtrace ();
$error = sprintf ('%s (\'%s\') in <strong>%s</strong> 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);