SQLite - get table list?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

SQLite - get table list?

Post by Stryks »

Does anyone happen to know how to pull a table list in SQLite?

I had high hopes for

Code: Select all

select * from sqlite_master; 
... but got no results (but no errors either).

I then tried various attempts at

Code: Select all

PRAGMA database_list;
I mean ... I don't even know what that SHOULD show ... but it did the same. No error but no results.

Any help would be great ... thanks.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Maybe:

Code: Select all

show tables;
:?:
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

Nope ... That way my first try, apparently the SQLite engine doesn't know the meaning of the word. I'm finding a few things that I took for granted in mySQL that are missing or hard to figure out in SQLite.

It appears that the first method I mentioned above DOES in fact work. For some reason it just wasn't returning any values in the PhpEd DB window. Coding it the long way into a page got results. Now just have to call just the tables and I'm set.

Thanks.
Post Reply