Hi Guys,

The following query that I am using is returning duplicate rows.

For a two word search:

SELECT DISTINCT
        pdf.title,
        pdf.filename,
        searchwords.ranking,
        pdf.summary
FROM
        pdf,
        words,
        searchwords
WHERE
        words.id = searchwords.word_id
        AND pdf.id = searchwords.pdf_id
        AND (words.word LIKE '%award%' OR words.word LIKE '%section%') ## <-
difference between 1 and 2 word search
ORDER BY
        ranking ASC;

For a one word search:

SELECT DISTINCT
        pdf.title,
        pdf.filename,
        searchwords.ranking,
        pdf.summary
FROM
        pdf,
        words,
        searchwords
WHERE
        words.id = searchwords.word_id
        AND pdf.id = searchwords.pdf_id
        AND (words.word LIKE '%award%')
ORDER BY
        ranking ASC;

The only problem is, it is still returning the same rows. As in, returning
rows that are exactly the same?

Any ideas?

Thanks

Scott Mebberson


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to