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?
It could be an issue with temporary files as you’ve suggested in your comment to Frank Heikens’s answer.
http://www.sqlite.org/tempfiles.html says:
If and where files are created is controlled by
SQLITE_TEMP_STORE,PRAGMA temp_storeandPRAGMA temp_store_directory, see http://www.sqlite.org/pragma.html