Sqlite3 and PDO problem with ORDER BY

Posted by Maenny on Stack Overflow See other posts from Stack Overflow or by Maenny
Published on 2010-04-05T14:55:02Z Indexed on 2010/04/05 15:03 UTC
Read the original article Hit count: 202

Filed under:
|
|
|

Hi,

I try to use the SQL statement

SELECT * FROM table ORDER BY column

via an PDO-Object in PHP. Problem is, that I always get an error (Call to a member function fetchall() on a non-object - that means, the query did not return a PDO-object) when using the names of all columnname EXCEPT for ID. When I query

SELECT * FROM table ORDER BY ID

it works. ID is the PRIMARY INTEGER KEY, all other columns are TEXT or NUMERIC, neither of them would works with the ORDER BY clause.

Any ideas?

© Stack Overflow or respective owner

Related posts about php

Related posts about sqlite3