Memories::Photo->set_sql(sorted_by_system_tag => q/
SELECT photo.id as id, title, uploader, uploaded, x, y
-FROM photo, system_tag, system_tagging
+FROM photo, system_tagging
WHERE system_tagging.photo = photo.id
- AND system_tagging.tag = system_tag.id
- AND system_tag.id = ?
+ AND system_tagging.tag = ?
ORDER BY photo.uploaded DESC
/
);
Memories::Photo->set_sql(sorted_by_tag => q/
SELECT photo.id as id, title, uploader, uploaded, x, y
-FROM photo, tag, tagging
+FROM photo, tagging
WHERE tagging.photo = photo.id
- AND tagging.tag = tag.id
- AND tag.id = ?
+ AND tagging.tag = ?
ORDER BY photo.uploaded DESC
/
);