pdo syntax for blotter
This commit is contained in:
parent
9d9a960d1b
commit
69701c671c
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue