At 15:05 -0300 3/27/02, Walter D. Funk wrote:
>I have a query like this
>
>select * from PROFILES where UCASE(DESCRIPTION) like '%A%'
>
>the result of this will be a set in which any member contains at least an
>"A",
>but I'd like to sort them so as the result set becomes like this
>
>
>first: "A"
>second:  "AAA"
>third:  "any string containing an A"
>and so on
>
>I´d like to display results this way , in this case the first data is much
>relevant than the third one.
>But in the practise i get all results mixed up
>
>i will appreciate any help
>
>thanx

LIKE evaluates to true or false, it doesn't return a relevance ranking.
You could play tricks with an expression in an ORDER BY clause, but
it's bound to be ugly.

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