diff options
author | nicosomb <nicolas@loeuillet.org> | 2013-04-17 15:11:57 +0200 |
---|---|---|
committer | nicosomb <nicolas@loeuillet.org> | 2013-04-17 15:11:57 +0200 |
commit | 1c182b6c9d74875054dc8efe75564ceab1bc1abe (patch) | |
tree | 97ab86be512a518ec3fac8d629211bb666741004 /inc/db.php | |
parent | 4456315b217f4eb253fc4403e43cdcb0012356e6 (diff) | |
download | wallabag-1c182b6c9d74875054dc8efe75564ceab1bc1abe.tar.gz wallabag-1c182b6c9d74875054dc8efe75564ceab1bc1abe.tar.zst wallabag-1c182b6c9d74875054dc8efe75564ceab1bc1abe.zip |
téléchargement des images d'un article
Diffstat (limited to 'inc/db.php')
-rw-r--r-- | inc/db.php | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -10,12 +10,15 @@ | |||
10 | 10 | ||
11 | class db { | 11 | class db { |
12 | var $handle; | 12 | var $handle; |
13 | function __construct($path) { | 13 | function __construct($path) |
14 | { | ||
14 | $this->handle = new PDO($path); | 15 | $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->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | 17 | $this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
16 | } | 18 | } |
17 | 19 | ||
18 | public function getHandle() { | 20 | public function getHandle() |
21 | { | ||
19 | return $this->handle; | 22 | return $this->handle; |
20 | } | 23 | } |
21 | } \ No newline at end of file | 24 | } \ No newline at end of file |