From 1dc90e8e36738dd430cd1aef51b70a100234521e Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 26 Nov 2023 10:39:08 +0100 Subject: [PATCH] query log --- web/pages/smart/controller.php | 4 +++- web/pages/smart/search.html.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/pages/smart/controller.php b/web/pages/smart/controller.php index 518cbe6..eb5c1ad 100644 --- a/web/pages/smart/controller.php +++ b/web/pages/smart/controller.php @@ -18,7 +18,8 @@ class Smart extends Page { { $db = new SQLite3(ROOT.DS.'../crawler/data.db'); $q = $_REQUEST['q']; - $res = $db->query("SELECT * FROM results WHERE teilnehmer LIKE '$q'"); + $query = "SELECT * FROM results WHERE teilnehmer LIKE '$q'"; + $res = $db->query($query); $results = []; while($row = $res->fetchArray()) { @@ -26,6 +27,7 @@ class Smart extends Page { } $this->set('results', $results); + $this->set('query', $query); $this->set('template', 'search.html.php'); } diff --git a/web/pages/smart/search.html.php b/web/pages/smart/search.html.php index 0f6fc68..e47794f 100644 --- a/web/pages/smart/search.html.php +++ b/web/pages/smart/search.html.php @@ -1,3 +1,5 @@ +
+