function sqf($queryString, $showerrors = true) { global $dbutils_show_errors; $dbutils_show_errors = $showerrors; if (is_array($queryString)) { foreach ($queryString as $key => $val) { if (sqlWriteStatement($val)) { assertDataNonRO('sqf:' . $val); } } } else { if (sqlWriteStatement($queryString)) { assertDataNonRO('sqf:' . $queryString); } } $q = new Q($queryString); $r = $q->fetch(); $q = null; return $r; }
function sqf($queryString, $showerrors = true) { global $dbutils_show_errors; $dbutils_show_errors = $showerrors; if (is_array($queryString)) { $qc = 0; foreach ($queryString as $key => $val) { $qc++; if ('' . @$val > '') { if (sqlWriteStatement($val)) { assertDataNonRO('sq:' . $val); } } else { dbiutils_stack_trace('No SQL statement given in array (item #' . $qc . ')', 0); } } if ($qc == 0) { dbiutils_stack_trace('No SQL statement given in array', 0); } foreach ($queryString as $key => $val) { if (sqlWriteStatement($val)) { assertDataNonRO('sqf:' . $val); } } } else { if ('' . @$queryString == '') { dbiutils_stack_trace('No SQL statement given', 0); } if (sqlWriteStatement($queryString)) { assertDataNonRO('sqf:' . $queryString); } } $q = new Q($queryString); $r = $q->fetch(); $q = null; return $r; }