Hi everyone!

I've been having trouble with SQLite in PHP. Basically I want to iterate
over all table of a database. I use the following query:

$handle = sqlite_open("db.sqlite");
$result = sqlite_query($handle, "SELECT name FROM sqlite_master WHERE
type='table' ORDER BY name");
$tables = sqlite_fetch_array($result);
var_dump($tables);

Unfortunately, it only returns the first table name in the result. If I
change the ORDER BY clause, the first table name of the according new
order gets returned.

If I run the same query in SQLiteBrowser, it returns all table names.
I do nothing else with the database in the PHP script. I've tried
exporting the database into SQL Commands and reimporting it, without any
change in behaviour.
Maybe someone has an idea about what I'm doing wrong?

-Christian


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to