In the last episode (Nov 12), Michael Kedl said: > > Looking thru the MYSQL archives I see a few people had interest in > > a "natural sort" method to sort text fields containing numbers. I > > to would like this feature. Has anything been done for this? > > > > Currently sorts text like: > > 1200 - A tale of 3 dogs > > 3 bright lights go on > > > > "Should be": > > 3 bright lights go on > > 1200 - A tale of 3 dogs
Try "... ORDER BY textfield+0", which will force mysql to convert the field to a number before sorting. -- Dan Nelson [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