téléchargement des images d'un article

This commit is contained in:
nicosomb
2013-04-17 15:11:57 +02:00
parent 4456315b21
commit 1c182b6c9d
5 changed files with 136 additions and 18 deletions

View File

@ -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;
}
}