From 1c182b6c9d74875054dc8efe75564ceab1bc1abe Mon Sep 17 00:00:00 2001 From: nicosomb Date: Wed, 17 Apr 2013 15:11:57 +0200 Subject: =?UTF-8?q?t=C3=A9l=C3=A9chargement=20des=20images=20d'un=20articl?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/db.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/db.php') diff --git a/inc/db.php b/inc/db.php index 705fc0c4..a1674ea7 100644 --- a/inc/db.php +++ b/inc/db.php @@ -10,12 +10,15 @@ class db { var $handle; - function __construct($path) { + function __construct($path) + { $this->handle = new PDO($path); + $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)'); $this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } - public function getHandle() { + public function getHandle() + { return $this->handle; } } \ No newline at end of file -- cgit v1.2.3