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:
parent
6f68542aef
commit
84435c6ed8
|
@ -617,7 +617,7 @@ class wpdb {
|
||||||
return false;
|
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);
|
$this->rows_affected = mysql_affected_rows($this->dbh);
|
||||||
// Take note of the insert_id
|
// Take note of the insert_id
|
||||||
if ( preg_match("/^\\s*(insert|replace) /i",$query) ) {
|
if ( preg_match("/^\\s*(insert|replace) /i",$query) ) {
|
||||||
|
|
Loading…
Reference in New Issue