From: Arun Persaud Date: Sun, 27 Nov 2011 06:52:37 +0000 (-0800) Subject: make tag search case insensitive X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=photo-tags.git;a=commitdiff_plain;h=2d429b7dd1457241e691e8a1e499c343a358668d;hp=26ae9884808f0613d35268818a3b0cd7ed247872 make tag search case insensitive --- diff --git a/getjson.php b/getjson.php index 14af09b..007ef7c 100644 --- a/getjson.php +++ b/getjson.php @@ -42,12 +42,12 @@ else $result = $DB->query("SELECT base_uri, filename FROM photos ". " left join photo_tags on photos.id=photo_tags.photo_id ". " left join tags on tags.id=photo_tags.tag_id ". - " where tags.name in ($tags) LIMIT $OFFSET, $N"); + " where tags.name COLLATE NOCASE in ($tags) LIMIT $OFFSET, $N"); $count = $DB->query("SELECT count(*) as total FROM photos ". " left join photo_tags on photos.id=photo_tags.photo_id ". " left join tags on tags.id=photo_tags.tag_id ". - " where tags.name in ($tags)"); + " where tags.name COLLATE NOCASE in ($tags)"); } else