tag query optimisation, now made simple, because mysql is speshal

git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.0@218 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-04 15:53:44 +00:00
parent 7fb5b5973f
commit eccd9f590a

View File

@ -129,7 +129,7 @@ class Database {
} }
else if(count($tag_search->variables) == 1 && $positive_tag_count == 1) { else if(count($tag_search->variables) == 1 && $positive_tag_count == 1) {
$query = new Querylet( $query = new Querylet(
"SELECT * FROM images WHERE images.id IN (SELECT image_id FROM tags WHERE tag = ?) ", "SELECT *,UNIX_TIMESTAMP(posted) AS posted_timestamp FROM tags, images WHERE tag LIKE ? AND tags.image_id = images.id ",
$tag_search->variables); $tag_search->variables);
if(strlen($img_search->sql) > 0) { if(strlen($img_search->sql) > 0) {