Results 1 to 1 of 1

Thread: problem with indexes is SELECT query

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Posts
    45

    problem with indexes in SELECT query

    "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..



    thanks
    -Alx-
    Last edited by Alx; 22 May 2008 at 01:03 AM.

Similar Threads

  1. Simple SQL Select Query Question
    By MrQuestions in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 19 Mar 2008, 07:26 PM
  2. Date Query Problem
    By binarytrends in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 09 Jan 2006, 07:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •