diff options
author | Arun Persaud <arun@nubati.net> | 2011-11-26 22:52:37 -0800 |
---|---|---|
committer | Arun Persaud <apersaud@lbl.gov> | 2011-11-26 22:52:37 -0800 |
commit | 2d429b7dd1457241e691e8a1e499c343a358668d (patch) | |
tree | a68924c4e356916641bbe6d36ef5c308a91e049f | |
parent | 26ae9884808f0613d35268818a3b0cd7ed247872 (diff) | |
download | photo-tags-2d429b7dd1457241e691e8a1e499c343a358668d.tar.gz photo-tags-2d429b7dd1457241e691e8a1e499c343a358668d.tar.bz2 photo-tags-2d429b7dd1457241e691e8a1e499c343a358668d.zip |
make tag search case insensitive
-rw-r--r-- | getjson.php | 4 |
1 files changed, 2 insertions, 2 deletions
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 |