diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -25,16 +25,8 @@ switch ($action) | |||
25 | 25 | ||
26 | $parametres_url = prepare_url($url); | 26 | $parametres_url = prepare_url($url); |
27 | 27 | ||
28 | try | 28 | $sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'; |
29 | { | 29 | $params_action = array($url, $parametres_url['title'], $parametres_url['content']); |
30 | # insert query | ||
31 | $query = $db->getHandle()->prepare('INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'); | ||
32 | $query->execute(array($url, $parametres_url['title'], $parametres_url['content'])); | ||
33 | } | ||
34 | catch (Exception $e) | ||
35 | { | ||
36 | error_log('insert query error : '.$e->getMessage()); | ||
37 | } | ||
38 | 30 | ||
39 | break; | 31 | break; |
40 | case 'delete': | 32 | case 'delete': |