aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--inc/poche/Database.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 3332b5a3..a366e866 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -345,7 +345,7 @@ class Database {
345 } 345 }
346 346
347 public function retrieveAllTags($user_id) { 347 public function retrieveAllTags($user_id) {
348 $sql = "SELECT tags.* FROM tags 348 $sql = "SELECT DISTINCT tags.* FROM tags
349 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id 349 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
350 LEFT JOIN entries ON tags_entries.entry_id=entries.id 350 LEFT JOIN entries ON tags_entries.entry_id=entries.id
351 WHERE entries.user_id=?"; 351 WHERE entries.user_id=?";
@@ -357,7 +357,7 @@ class Database {
357 357
358 public function retrieveTag($id, $user_id) { 358 public function retrieveTag($id, $user_id) {
359 $tag = NULL; 359 $tag = NULL;
360 $sql = "SELECT tags.* FROM tags 360 $sql = "SELECT DISTINCT tags.* FROM tags
361 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id 361 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
362 LEFT JOIN entries ON tags_entries.entry_id=entries.id 362 LEFT JOIN entries ON tags_entries.entry_id=entries.id
363 WHERE tags.id=? AND entries.user_id=?"; 363 WHERE tags.id=? AND entries.user_id=?";