Capture last db error. Pass it in WP_Error data when term inserts fail. Fix typo in WP_Ajax_Response

git-svn-id: https://develop.svn.wordpress.org/trunk@7431 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-20 23:34:32 +00:00
parent 2553a64d19
commit 39a2681bc7
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ class wpdb {
var $show_errors = false;
var $suppress_errors = false;
var $last_error = '';
var $num_queries = 0;
var $last_query;
var $col_info;
@@ -278,7 +279,7 @@ class wpdb {
$this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
// If there is an error then take note of it..
if ( mysql_error($this->dbh) ) {
if ( $this->last_error = mysql_error($this->dbh) ) {
$this->print_error();
return false;
}