summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-12 13:06:53 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-12 13:06:53 +0100
commit757e336f0ac6fc2c636706343d4c63aff2f228e6 (patch)
treeffe7f6f41cf57e647e3d8fae81dceec0908ce17b
parentc4e3c0e5c761c92f95394b51b1911ce533776d61 (diff)
fixed sql query for tag-search
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r--phpfspot.class.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index c2ec3ac..826fafd 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -752,13 +752,13 @@ class PHPFSPOT {
FROM photo_tags pt1
INNER JOIN photo_tags pt2
ON pt1.photo_id=pt2.photo_id
- INNER JOIN tags t1
- ON pt1.tag_id=t1.id
+ INNER JOIN tags t
+ ON pt1.tag_id=t.id
INNER JOIN photos p
ON pt1.photo_id=p.id
INNER JOIN tags t2
ON pt2.tag_id=t2.id
- WHERE t1.name LIKE '%". $_SESSION['searchfor'] ."%' ";
+ WHERE t.name LIKE '%". $_SESSION['searchfor'] ."%' ";
if(isset($additional_where_cond))
$query_str.= "AND ". $additional_where_cond ." ";