Fix deletion function
This commit is contained in:
parent
30ef779b14
commit
6612a72e9f
4
main.go
4
main.go
|
@ -112,10 +112,10 @@ func delHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
db, err := sql.Open("mysql", DATABASE)
|
db, err := sql.Open("mysql", DATABASE)
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
stmt, err := db.Prepare("delete from pastebin where delkey=? id=?")
|
stmt, err := db.Prepare("delete from pastebin where delkey=?")
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
res, err := stmt.Exec(html.EscapeString(delkey), html.EscapeString(paste))
|
res, err := stmt.Exec(html.EscapeString(delkey))
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
affect, err := res.RowsAffected()
|
affect, err := res.RowsAffected()
|
||||||
|
|
Loading…
Reference in New Issue