From 6612a72e9f7010907961f8607922dd62a2d9d44b Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 13:58:15 +1000 Subject: [PATCH] Fix deletion function --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 7044f13..2b5d343 100644 --- a/main.go +++ b/main.go @@ -112,10 +112,10 @@ func delHandler(w http.ResponseWriter, r *http.Request) { db, err := sql.Open("mysql", DATABASE) check(err) - stmt, err := db.Prepare("delete from pastebin where delkey=? id=?") + stmt, err := db.Prepare("delete from pastebin where delkey=?") check(err) - res, err := stmt.Exec(html.EscapeString(delkey), html.EscapeString(paste)) + res, err := stmt.Exec(html.EscapeString(delkey)) check(err) affect, err := res.RowsAffected()