1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00

* DB::isManip now handles create, drop, alter, grant, revoke.

This commit is contained in:
Stig Bakken
2001-04-16 22:16:38 +00:00
parent ee17aae3ac
commit f35cef5928

View File

@@ -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;