summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 9c426a3..eb8a8e6 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -154,8 +154,10 @@ class PHPFSPOT {
$result = $this->db->db_query("
SELECT tag_id as id, count(tag_id) as quantity
FROM photo_tags
+ INNER JOIN tags t
+ ON t.id = tag_id
GROUP BY tag_id
- ORDER BY tag_id ASC
+ ORDER BY t.name ASC
");
$tags = Array();