Commit 328bf80d authored by Jonny Bradley's avatar Jonny Bradley

[FIX] report string: Quote table names with backticks

parent 7ef433d1
......@@ -77,7 +77,7 @@ function searchAllDB($search)
foreach ($rs as $key => $val) {
$vals = array_values($val);
$table = $vals[0];
$sql2 = "SHOW COLUMNS FROM ".$table;
$sql2 = "SHOW COLUMNS FROM `$table`";
$rs2 = $tikilib->fetchAll($sql2);
foreach ($rs2 as $key2 => $val2) {
$vals2 = array_values($val2);
......@@ -88,7 +88,7 @@ function searchAllDB($search)
$qrySearch = '%'.$search.'%';
$args = array($qrySearch);
$sql_search_fields[] = "`" . $colum . "` like ?"; // '%" . str_replace("'", "''", $search) . "%'";
$sql_search = "select * from " . $table . " where ";
$sql_search = "select * from `$table` where ";
$sql_search .= implode(" OR ", $sql_search_fields);
$rs3 = $tikilib->fetchAll($sql_search, $args);
if (!empty($rs3)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment