Forums > MaxMSP

sqlite select tables

February 25, 2009 | 12:48 am


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"
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

February 25, 2009 | 3:25 pm

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

February 25, 2009 | 4:41 pm

You can do that using the sqlite_master table.

SELECT * FROM sqlite_master

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

February 25, 2009 | 5:12 pm

Thanks it works!
Vive ej!

Viewing 4 posts - 1 through 4 (of 4 total)