Re: [sqlite] checking if a table exists

2017-09-24 Thread John McMahon
On 23/09/2017 05:36, mikeegg1 wrote: I’m using the statement: select count(*) from sqlite_master where type = 'table' and name = ‘$NAME’; This statement works fine in the sqlite3 shell. This statement does not work in my API. Is there a PRAGMA I need to issue so I can check for table existen

Re: [sqlite] checking if a table exists

2017-09-22 Thread Brian Curley
ver need to do writable_schema = on for any normal > operation. You can always read the schema even without that. > >>> > >>> -To my untrained eye it looks like you made a "name" variable, but > never actually bound it to the statement. Usually that

Re: [sqlite] checking if a table exists

2017-09-22 Thread Igor Korot
n: cur.execute(, >> values to bind>) >>> cur.execute("select count(*) from sqlite_master where type = 'table' and >>> name = ?;", (,)) >>> >>> >>> -----Original Message- >>> From: sqlite-users [mailto:sqli

Re: [sqlite] checking if a table exists

2017-09-22 Thread mikeegg1
bind>) >> cur.execute("select count(*) from sqlite_master where type = 'table' and >> name = ?;", (,)) >> >> >> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On >> Behalf Of mikeegg1 >> Sent:

Re: [sqlite] checking if a table exists

2017-09-22 Thread Igor Korot
*) from sqlite_master where type = 'table' and name > = ?;", (,)) > > > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Behalf Of mikeegg1 > Sent: Friday, September 22, 2017 3:36 PM > To: SQLi

Re: [sqlite] checking if a table exists

2017-09-22 Thread David Raymond
sers [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of mikeegg1 Sent: Friday, September 22, 2017 3:36 PM To: SQLite mailing list Subject: [sqlite] checking if a table exists I’m using the statement: select count(*) from sqlite_master where type = 'table' and name = ‘$NAME’;

[sqlite] checking if a table exists

2017-09-22 Thread mikeegg1
I’m using the statement: select count(*) from sqlite_master where type = 'table' and name = ‘$NAME’; This statement works fine in the sqlite3 shell. This statement does not work in my API. Is there a PRAGMA I need to issue so I can check for table existence? TIA Mike PERL code to check for ta