Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. class Database extends PDO{
  2.  
  3. public function __construct(){
  4. parent::__construct("sqlite: userquestion.db");
  5.  
  6. $this->exec("PRAGMA foreign_keys = ON;"); // enable foreign keys
  7. }
  8. }
  9.  
  10. class Database extends PDO {
  11. public function __construct() {
  12. parent::__construct("sqlite:" . realpath("userquestion.db"));
  13. $this->exec("PRAGMA foreign_keys = ON;"); // enable foreign keys
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement