From e19b3ef034c4e0fc3716ac60a31c4a24fb0e933a Mon Sep 17 00:00:00 2001 From: "color.diff=auto" Date: Sat, 19 Mar 2022 16:58:32 -0600 Subject: [PATCH] Unique Items SQL fix. genDocs uniqueitems.html table fix. --- ajax/uniqueitems.php | 7 ++++--- genDocs.php | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ajax/uniqueitems.php b/ajax/uniqueitems.php index 2e2538d..d6347bb 100755 --- a/ajax/uniqueitems.php +++ b/ajax/uniqueitems.php @@ -136,8 +136,9 @@ WHERE `type` IS NOT NULL AND uniqueitems.`code`= $table.`code` AND $table.`code` */ if ($cmd == 'search') { $search = $_GET['search']; - $sql = "SELECT * FROM uniqueitems WHERE `index` LIKE '%?%' OR code LIKE '%?%' AND enabled=1 ORDER BY `index`"; - $res = PDO_FetchAll($sql,[$search, $search]); + $sql = "SELECT * FROM uniqueitems WHERE `index` LIKE '%$search%' OR code LIKE '%$search%' AND enabled=1 ORDER BY `index`"; + $res = PDO_FetchAll($sql); + $html = ''; foreach ($res as $r) { if ($sort == 'index') { @@ -193,4 +194,4 @@ if ($cmd == 'getString') { header('Content-Type: application/json'); echo json_encode($return, JSON_INVALID_UTF8_IGNORE); -} \ No newline at end of file +} diff --git a/genDocs.php b/genDocs.php index 1b83031..1c13886 100755 --- a/genDocs.php +++ b/genDocs.php @@ -398,9 +398,11 @@ EOT; echo $itemBoxBottom; ob_flush(); - $htmlFinal .= $props . $itemBoxBottom . $tableBottom; + $htmlFinal .= $props . $itemBoxBottom; }// end loop + $htmlFinal .= $tableBottom; + echo $htmlbottom; $htmlFinal .= $htmlbottom;