From e1e51fff075537385ac83d9b36417d4d58a4f6d9 Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sat, 8 Nov 2014 15:43:11 -0500 Subject: [PATCH] readd sqlrun --- req.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/req.php b/req.php index e15ad32..cd0ffba 100644 --- a/req.php +++ b/req.php @@ -59,6 +59,16 @@ function sqlfetch($table, $rowf, $where, $wval) { return $row[$rowf]; } +//SQL Functions +//Sanitize input when using sqlrun! +function sqlrun($query) { + global $mysqli; + $queryrs = $query; + $resultrs = $mysqli->query($queryrs) or die("ERROR in $query"); + return true; +} + + function showerror() { //Show an error, and die. If Debug is on, show SQL error message global $debug;