2009/2/9 Paulson, Ariel <a...@stowers.org>:
> Hi all,
>
> Does anyone know how grab the output of a dot command using DBD::SQLite?  
> Specifically I'm trying to get this mysql query to run:
>
> $sth = $dbh->prepare("show tables")
>
> But in SQLite, "show tables" is ".tables", so my new query is:
>
> $sth = $dbh->prepare(".tables")
>
> Only the DBD croaks whenever I pass in a period, even if it's escaped.  The 
> messages vary between win & linux, but the linux message is:
>
> DBD::SQLite::db prepare failed: near ".": syntax error(1) at dbdimp.c line 271
>
> Any ideas or workarounds would be greatly appreciated.
>

dot commands are processed by the sqlite shell utility, not the library.

try "select name from sqlite_master where type='table';"

also have a look at "pragma table_info;"
http://www.sqlite.org/pragma.html#schema

> Thanks,
> Ariel
>

Rgds,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to