From 69701c671c99b1a4db7c9871d484e2f1e0a163c0 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 28 Jul 2011 12:16:28 +0100 Subject: [PATCH] pdo syntax for blotter --- contrib/blotter/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/blotter/main.php b/contrib/blotter/main.php index 1cde0320..04cd2e8c 100644 --- a/contrib/blotter/main.php +++ b/contrib/blotter/main.php @@ -99,7 +99,7 @@ class Blotter extends SimpleExtension { } else { $id = int_escape($_POST['id']); if(!isset($id)) { die("No ID!"); } - $database->Execute("DELETE FROM blotter WHERE id=?", array($id)); + $database->Execute("DELETE FROM blotter WHERE id=:id", array("id"=>$id)); log_info("blotter", "Removed Entry #$id"); $page->set_mode("redirect"); $page->set_redirect(make_link("blotter/editor")); @@ -123,7 +123,7 @@ class Blotter extends SimpleExtension { private function display_blotter() { global $database, $config; $limit = $config->get_int("blotter_recent", 5); - $entries = $database->get_all("SELECT * FROM blotter ORDER BY id DESC LIMIT ?", array($limit)); + $entries = $database->get_all("SELECT * FROM blotter ORDER BY id DESC LIMIT :lim", array("lim"=>$limit)); $this->theme->display_blotter($entries); } }