From: Jeff D. <da...@da...> - 2001-09-19 00:25:52
|
On Sep 18, 2001, Steve Wainstead said: > > Unfortunately this generates a lot of errors: > > http://phpwiki.sf.net/alpha/ > I think it's a bug in whatever version of PEAR DB they have on SF. It doesn't recognize "LOCK" as one of the SQL command which doesn't return any data, and so throws an error when it doesn't. I've kludged it up for now, by copying a patched version of DB.php into htdocs/alpha. (The only difference attached at the end of this note.) It's interesting to note that the version of DB.php on SF in significantly more recent than the one I've been using, yet has this show-stopping bug. I hope that using the PEAR stuff isn't going to cause too many headaches in this regard. I'll look into reporting the error to the PEAR guys... Jeff --- DB.php.orig Tue Sep 18 17:20:06 2001 +++ DB.php Tue Sep 18 17:17:24 2001 @@ -297,7 +297,7 @@ */ function isManip($query) { - if (preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DRO P|ALTER|GRANT|REVOKE)\s+/i', $query)) { + if (preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DRO P|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $query)) { return true; } return false; { |