Return affected rows for alter queries. Props BjornW. fixes #7215

git-svn-id: https://develop.svn.wordpress.org/trunk@9204 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-16 19:54:00 +00:00
parent 6f68542aef
commit 84435c6ed8
1 changed files with 1 additions and 1 deletions

View File

@ -617,7 +617,7 @@ class wpdb {
return false;
}
if ( preg_match("/^\\s*(insert|delete|update|replace) /i",$query) ) {
if ( preg_match("/^\\s*(insert|delete|update|replace|alter) /i",$query) ) {
$this->rows_affected = mysql_affected_rows($this->dbh);
// Take note of the insert_id
if ( preg_match("/^\\s*(insert|replace) /i",$query) ) {