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 =
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
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
3 matches
Mail list logo