diff --git a/application/models/user_marks_to_tags_model.php b/application/models/user_marks_to_tags_model.php index 10d0a431..19c94f60 100644 --- a/application/models/user_marks_to_tags_model.php +++ b/application/models/user_marks_to_tags_model.php @@ -97,6 +97,7 @@ private function getTagList($user_id, $limit=10, $type) COUNT(user_marks_to_tags.tag_id) as total, tags.name, tags.slug FROM `user_marks_to_tags` + INNER JOIN `users_to_marks` ON users_to_marks.users_to_mark_id = user_marks_to_tags.users_to_mark_id AND users_to_marks.archived_on IS NULL AND users_to_marks.active = '1' LEFT JOIN `tags` ON user_marks_to_tags.tag_id = tags.tag_id WHERE user_marks_to_tags.user_id = '" . $user_id . "' GROUP BY user_marks_to_tags.tag_id ORDER BY " . $order . " DESC LIMIT " . $limit