sqlite select tables

rolodub's icon

Hello,

Having some fun with sqlite in maxmsp. Thanks for tutorial!
A lot of requests are working BUT I cannot have a list of the names of the tables themselves.

I have try
exec "show tables"
exec ".tables"
or
function get_tables(){
var database=arguments[0];
exec("SELECT * FROM '"+database+"' WHERE type='table' ORDER BY name");
    }

No success...
Need a little help.
Thank you
Roland

rolodub's icon

small solution.
I generate tables names trough a autopopulate umenu...

Emmanuel Jourdan's icon

You can do that using the sqlite_master table.

SELECT * FROM sqlite_master

It's explained in the Querying the SQLITE_MASTER table paragraph.

rolodub's icon

Thanks it works!
Vive ej!