Walter Try adding to your select statement:
ORDER BY DESCRIPTION ASC David -----Original Message----- From: Walter D. Funk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 11:05 AM To: [EMAIL PROTECTED] 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