Re: [sqlite] DROP TABLE IF EXISTS my_table

2007-02-05 Thread John Stanton
If you can find a way of dropping a table which doesn't exist, use it. Otherwise just drop the table. Cecilia VIGNY wrote: Hi, I'm using SQLite with a PHP program and I would like to execute this SQL request : DROP TABLE IF EXISTS clients; See my code : $allsqls=<<$sqlite =

Re: [sqlite] DROP TABLE IF EXISTS my_table

2007-02-05 Thread Dennis Cote
Cecilia VIGNY wrote: Why ? Can't we use "IF EXISTS" with php ? Does another solution exist ? What version of sqlite are you using? You can check with select sqlite_version(); The IF EXISTS clause was added to SQLite in version 3.3.8. Older version will not accept that syntax. HTH

[sqlite] DROP TABLE IF EXISTS my_table

2007-02-05 Thread Cecilia VIGNY
Hi, I'm using SQLite with a PHP program and I would like to execute this SQL request : DROP TABLE IF EXISTS clients; See my code : $allsqls=<<$sqlite = sqlite_open('pac.sdb') or die ('Impossible de se connecter a la base SQLite'); //Création des tables dans la base SQLite