mirror of
https://github.com/cydrobolt/polr.git
synced 2024-11-12 21:22:28 +01:00
readd sqlrun
This commit is contained in:
parent
8b50c2eec4
commit
e1e51fff07
10
req.php
10
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;
|
||||
|
Loading…
Reference in New Issue
Block a user