From: Dan Nelson Date: July 9 2002 8:35pm Subject: Re: Basic Q's: Numerical Sorting List-Archive: http://lists.mysql.com/mysql/114131 Message-Id: <20020709203542.GG20718@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Jul 09), CVIOG at UGA said: > I have a fairly basic question: How do I sort > numerically? Normally when I query using "ORDER BY > (field)", it orders by the first digit (i.e. 1, 10, 2, > 21, 3, 32) rather than by number (1, 2, 3, 10, 21, > 32). Either alter the table to make that field an INTEGER column, or "ORDER BY field+0" to force mysql to internally convert the field to a number before sorting. -- Dan Nelson dnelson@stripped