| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | July 9 2002 8:35pm |
| Subject: | Re: Basic Q's: Numerical Sorting | ||
| View as plain text | |||
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
| Thread | ||
|---|---|---|
| • Basic Q's: Numerical Sorting | CVIOG at UGA | 9 Jul |
| • Re: Basic Q's: Numerical Sorting | Serge Paquin | 9 Jul |
| • Re: Basic Q's: Numerical Sorting | Dan Nelson | 9 Jul |
| • RE: Basic Q's: Numerical Sorting | Luc Foisy | 9 Jul |
