Home » Database » DB » Bug #8404
query problem with 'into' in where clause
Details
| Submitted | 2006-08-09 21:05 UTC |
|---|---|
| From | mele at modwest dot com |
| Status | Duplicate |
| Package | DB |
| PHP Version | 5.1.2 |
| OS | Debian |
| Roadmaps | (Not assigned) |
Comments
[2006-08-09 21:05 UTC] mele at modwest dot com
Description:
------------
When executing a query with a simple select sql with 'into' in the where clause (a text field) the query function mistakenly thinks the query is a data manipulation query and returns DB_OK instead of the result set.
example:
Select book_id from books where title = 'journey into space'
executing $db->query($sql) where $sql is the above select statement, will return DB_OK and not the result set.
This is with pssql.
Test script:
---------------
$sql = 'select book_id from books where title = 'journey into space';
$res = $db->query($sql);
$res->numRows();
Expected result:
----------------
I would expect to receive the number of rows that match the query
Actual result:
--------------
Fatal error: Call to a member function numRows() on a non-object