From 8d2e9b6031c2d5298de50e7c9cdc0674281e6791 Mon Sep 17 00:00:00 2001 From: alopexc0de Date: Sat, 9 Feb 2013 05:34:07 -0500 Subject: [PATCH] Single tag sorting works now --- img/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/img/index.php b/img/index.php index 1aaec64..77c52fa 100755 --- a/img/index.php +++ b/img/index.php @@ -10,8 +10,9 @@ * ----------------------------------------------------------- * TODO: * - * Image tag sorting + * Image tag sorting - Single tag sorting possible * Properly align image in post box + * Search with multiple terms * JavaScript fo show bigger image if clicked * Convert to mysqli * @@ -66,7 +67,7 @@ echo "

Pictures uploaded with the tag: ".$_GET['tag'].":

"; require('dbsettings.php'); $tag = sanitize($_GET['tag']); - $sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE 'tags' LIKE '$tag'"; + $sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE tags LIKE '%$tag%'"; $result = mysql_query($sql); $count = mysql_num_rows($result); if($count >= 1){ @@ -81,7 +82,7 @@ $comment = $row['comment']; $username = $row['username']; $tags = $row['tags']; - echo "$img - $time - $size - Username: $username
"; + echo "$img - $time - $size - Uploader: $username
"; } } echo "



";