aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/db.php
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-17 15:32:57 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-17 15:32:57 +0200
commitd178419c66fb1950aee7dc8e012c35f12f2a44bc (patch)
treee7bf5bde7f6de45824b3b9a4a944f524dac5f1da /inc/db.php
parent1c182b6c9d74875054dc8efe75564ceab1bc1abe (diff)
downloadwallabag-d178419c66fb1950aee7dc8e012c35f12f2a44bc.tar.gz
wallabag-d178419c66fb1950aee7dc8e012c35f12f2a44bc.tar.zst
wallabag-d178419c66fb1950aee7dc8e012c35f12f2a44bc.zip
README, CREDITS & chmod
Diffstat (limited to 'inc/db.php')
-rw-r--r--inc/db.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/inc/db.php b/inc/db.php
index a1674ea7..60d7c108 100644
--- a/inc/db.php
+++ b/inc/db.php
@@ -10,15 +10,13 @@
10 10
11class db { 11class db {
12 var $handle; 12 var $handle;
13 function __construct($path) 13 function __construct($path) {
14 {
15 $this->handle = new PDO($path); 14 $this->handle = new PDO($path);
16 $this->handle->exec('CREATE TABLE IF NOT EXISTS "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "title" VARCHAR, "url" VARCHAR UNIQUE , "is_read" INTEGER DEFAULT 0, "is_fav" INTEGER DEFAULT 0, "content" BLOB)'); 15 $this->handle->exec('CREATE TABLE IF NOT EXISTS "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "title" VARCHAR, "url" VARCHAR UNIQUE , "is_read" INTEGER DEFAULT 0, "is_fav" INTEGER DEFAULT 0, "content" BLOB)');
17 $this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 16 $this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
18 } 17 }
19 18
20 public function getHandle() 19 public function getHandle() {
21 {
22 return $this->handle; 20 return $this->handle;
23 } 21 }
24} \ No newline at end of file 22} \ No newline at end of file