At 18:02 03/07/2008, Simon Davies wrote: >Hi Tim, > >select count(*) from sqlite_master; > >will return 0 on a brand new db > >Rgds, >Simon
Thanks - that's a handy pointer. At 18:04 03/07/2008, Igor Tandetnik wrote: >Tim Streater <[EMAIL PROTECTED]> >wrote: > > As a work around I thought I might check that the newly opened db has > > no tables, and clean up if so. My question is, what query can I make > > of the db to determine that it has no tables? > >select exists (select * from sqlite_master where type='table'); > >Igor Tandetnik Aha - another useful clue. At 19:04 03/07/2008, Stephen Woodbridge wrote: >Why don't you check for the existence of the file using PHP BEFORE you >open it in? Trivial file exist test in PHP. OK, OK, red faces on this side of the keyboard. Still, I'm glad I asked as the info I got back has allowed me to add extra sanity checks. Thanks all. -- Tim _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users