From: Stig Bakken Date: Mon, 16 Apr 2001 22:16:38 +0000 (+0000) Subject: * DB::isManip now handles create, drop, alter, grant, revoke. X-Git-Tag: php-4.0.6RC1~401 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f35cef5928dae36331392f038602653e4da52b02;p=php * DB::isManip now handles create, drop, alter, grant, revoke. --- diff --git a/pear/DB.php b/pear/DB.php index d9c410ec3f..462d0ece29 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -283,8 +283,9 @@ class DB } /** - * Tell whether a query is a data manipulation query (insert, update - * or delete). + * Tell whether a query is a data manipulation query (insert, + * update or delete) or a data definition query (create, drop, + * alter, grant, revoke). * * @access public * @@ -294,7 +295,7 @@ class DB */ function isManip($query) { - if (preg_match('/^\s*(INSERT|UPDATE|DELETE|REPLACE)\s+/i', $query)) { + if (preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER|GRANT|REVOKE)\s+/i', $query)) { return true; } return false;