|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-28 09:38 UTC] cox@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 06:00:01 2025 UTC |
Description: ------------ not that the information is that helpfull :) --- Projects/pear/pearcvs/DB/DB/pgsql.php 2003-07-19 17:38:35.000000000 +0800 +++ /usr/share/pear/DB/pgsql.php 2003-08-14 11:24:34.000000000 +0800 @@ -170,8 +170,9 @@ if ($ismanip) { $this->affected = @pg_cmdtuples($result); return DB_OK; - } elseif (preg_match('/^\s*\(?\s*SELECT\s+/si', $query) && - !preg_match('/^\s*\(?\s*SELECT\s+INTO\s/si', $query)) { + } elseif ((preg_match('/^\s*\(?\s*SELECT\s+/si', $query) && + !preg_match('/^\s*\(?\s*SELECT\s+INTO\s/si', $query)) || + preg_match('/^\s*EXPLAIN/si',$query )) { /* PostgreSQL commands: ABORT, ALTER, BEGIN, CLOSE, CLUSTER, COMMIT, COPY, CREATE, DECLARE, DELETE, DROP TABLE, EXPLAIN, FETCH, Reproduce code: --------------- $db->getAll('EXPLAIN SELECT * FROM anytable'); will barf with selecton on non-object. ** DB_Common::getAll() should also check the return value for query is not an integer...