From 3e188a7c8de484a57c05126072f76860c7746b39 Mon Sep 17 00:00:00 2001 From: nicosomb Date: Mon, 15 Apr 2013 09:11:48 +0200 Subject: [PATCH] =?UTF-8?q?suppression=20doublon=20du=20code=20pour=20la?= =?UTF-8?q?=20requ=C3=AAte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index d56c194..8c695cd 100755 --- a/index.php +++ b/index.php @@ -25,16 +25,8 @@ switch ($action) $parametres_url = prepare_url($url); - try - { - # insert query - $query = $db->getHandle()->prepare('INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'); - $query->execute(array($url, $parametres_url['title'], $parametres_url['content'])); - } - catch (Exception $e) - { - error_log('insert query error : '.$e->getMessage()); - } + $sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'; + $params_action = array($url, $parametres_url['title'], $parametres_url['content']); break; case 'delete':