Re: sorting a nummeric list

From: Date: Mon, 09 Oct 2000 08:23:48 +0000
Subject: Re: sorting a nummeric list
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19161@lists.php.net to get a copy of this message
I can't redifine the field as it is also used as for holding text values in other records! _________________________ NetGroep BV Dijnselburgerlaan 7-9 3705 LP ZEIST T. (030) 699 16 99 F. (030) 699 16 00 E. info@netgroep.nl I. http://www.netgroep.nl _________________________ > From: Daniel Convissor <danielc@analysisandsolutions.com> > Organization: The Analysis and Solutions Company > Date: Sun, 8 Oct 2000 13:11:47 -0400 (EDT) > To: php-general@lists.php.net (php) > Subject: Re: [PHP] sorting a nummeric list > > Hi Olav: > >> I have a resultset from MySQL containing a column with integer values. When >> I use de ORDER BY statement to sort the rows on these integer values, I get >> the following result: >> 1 >> 10 >> 2 >> 3 >> 30 >> 4 > > This indicates your field was defined as a text type (ie char, > varchar, text) not a numeric field (ie int, double). Best solution is to > redefine the field. > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > More than just answers. Solutions. (SM) > http://www.analysisandsolutions.com/ > 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#19161) next »