note 105804 added to pdo.query
| From: | hundalasiliah at gmail dot com | Date: | Fri, 16 Sep 2011 11:03:46 +0000 |
| Subject: | note 105804 added to pdo.query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183210@lists.php.net to get a copy of this message | ||
I have noticed that depending on the PDO version (or maybe PHP version?) a PDO::query command can
return false or a resultset, if the query reads a view instead of a table.
Example: I have a view named "inf_matriculados". If I use the command
PDO::query("SELECT expediente, completo FROM inf_matriculados ORDER BY completo"), I get:
* false on my paid domain webserver (PHP VERSION: 5.2.17, SQLite Library: 3.3.7)
* a result on my laptop (PHP 5.3, SQLite library 3.6)
Is this behaviour documented?
----
Server IP: 130.206.1.5
Probable Submitter: 80.58.205.54 (proxied: 80.38.117.101)
----
Manual Page -- http://www.php.net/manual/en/pdo.query.php
Edit -- https://master.php.net/note/edit/105804
Del: integrated -- https://master.php.net/note/delete/105804/integrated
Del: useless -- https://master.php.net/note/delete/105804/useless
Del: bad code -- https://master.php.net/note/delete/105804/bad+code
Del: spam -- https://master.php.net/note/delete/105804/spam
Del: non-english -- https://master.php.net/note/delete/105804/non-english
Del: in docs -- https://master.php.net/note/delete/105804/in+docs
Del: other reasons-- https://master.php.net/note/delete/105804
Reject -- https://master.php.net/note/reject/105804
Search -- https://master.php.net/manage/user-notes.php