searpl

a small php sqlite search engine. <a href="https://thunix.net/~xfnw/search">see it in action</a>
Log | Files | Refs | README

commit 6a1b3d66d8800b396fcf8c3782a976248fc94995
parent be5b2503194d4395ff971ce77af3e72d8ee06704
Author: xfnw <xfnw@thunix.net>
Date:   Tue, 15 Dec 2020 21:02:31 -0500

make sorting case-insensitive

Diffstat:
Mindex.php | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php @@ -53,7 +53,7 @@ if (isset($_GET['q']) && preg_replace('/\s+/', '', $_GET['q']) != '') { while ($row = $stmt->fetch()) { $score = 0; foreach ($terms as $param) - $score = $score + substr_count($row['content'],$param); + $score = $score + substr_count(strtolower($row['content']),strtolower($param)); array_push($scores, $score); $row['score'] = $score; array_push($rows, $row);