I have created a search page which shows all records from a table that
include one or more words of the search string.  Is there a way I can
have MySQL sort the results according to relevance, and only display
each recordset once?

I am using ASP with IIS 5

  txtSearch = Request("txtSearch")
  arrSearch = split(txtSearch, " ")
  tmpSearch = ""
  For x = 0 To UBound(arrSearch)
    If x <> 0 Then
          tmpSearch = tmpSearch & "or "
        End If
    tmpSearch = tmpSearch & "us_desc LIKE '%"& arrSearch(x) &"%'"
  Next

  searchString = "SELECT * FROM consign WHERE consign_num =
'"&prodRs("consign_num")&"' AND ("& tmpSearch &") ORDER BY consign_num
ASC"

Thanks in advance for any help you can provide.

Sincerely,

Nick Boldt
Computer Network Administrator
Track of the Wolf
Elk River, MN 55330
Tel: 763-633-2500  Fax: 763-633-2550
www.trackofthewolf.com
[EMAIL PROTECTED]








---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to