Alx
22 May 2008, 01:15 AM
"SELECT id,type,count(id) AS count from tags_table WHERE type in($type_string) AND tag in($tag_string) GROUP BY id,type ORDER BY count DESC LIMIT $index , 15 ";
ok so this query is called when an individual searches a string of tags (example: 'hot sun florida beach')... The results are returned so that files containing ALL of the tags searched appear first in the results. it works fine with one exception.....
The problem I am having is with my $index....The first result returned is not index 0. It seems as though the indexes were set and THEN ordered, making them random and useless. So going from one file #1 to file #2 in the results could be sending me from index 156 to index 99 when it should be going from index 0 to index 1.....Any idea how I can fix this..
:cold:
thanks
-Alx-
ok so this query is called when an individual searches a string of tags (example: 'hot sun florida beach')... The results are returned so that files containing ALL of the tags searched appear first in the results. it works fine with one exception.....
The problem I am having is with my $index....The first result returned is not index 0. It seems as though the indexes were set and THEN ordered, making them random and useless. So going from one file #1 to file #2 in the results could be sending me from index 156 to index 99 when it should be going from index 0 to index 1.....Any idea how I can fix this..
:cold:
thanks
-Alx-