PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #8404

query problem with 'into' in where clause

Details

Submitted2006-08-09 21:05 UTC
Frommele at modwest dot com
StatusDuplicate
PackageDB
PHP Version5.1.2
OSDebian
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