Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. $base = "calendrier.sqlite";
  3. $dir = "/var/";
  4.  
  5.  
  6. if(!file_exists($dir.$base)) {
  7.  
  8. $base_hndl = new SQLite3($dir.$base);
  9. $requete = "CREATE TABLE 'event' (
  10. id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  11. title TEXT NOT NULL,
  12. start TEXT NOT NULL,
  13. end TEXT NULL,
  14. description TEXT NULL,
  15. )";
  16.  
  17. $resultat = $base_hndl->exec($requete);
  18.  
  19. echo "$base created";
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement