Just an aside, the "like" comparison is case insensitive -- so you don't need the "UCASE" in this example.
like '%A%' will match both "A" and "a". --jeff ----- Original Message ----- From: "Walter D. Funk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 10:05 AM Subject: How can I Sort by Relevance? > 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 > > > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- 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