Re: still problem with getting HIGHest and LOWest VALUES

From: Date: Sun, 30 Sep 2001 19:58:04 +0000
Subject: Re: still problem with getting HIGHest and LOWest VALUES
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-69383@lists.php.net to get a copy of this message
Define the column as an INT or BIGINT. That should solve the problem. ----- Original Message ----- From: "Teqila MAN" <teqilaman@poczta.wp.pl> To: "News" <news@vdgeijn.com>; <php-general@lists.php.net> Sent: 30 September 2001 17:15 Subject: Odp: [PHP] still problem with getting HIGHest and LOWest VALUES > Yes i have it defined as text.... so what should i put instead ? > > ----- Wiadomość oryginalna ----- > Od: News <news@vdgeijn.com> > Do: <php-general@lists.php.net> > Wysłano: 30 września 2001 16:47 > Temat: Re: [PHP] still problem with getting HIGHest and LOWest VALUES > > > > I'm not much into PHP, but looking at it from SQL I guess you have defined > > the price column as a string? Make it an integer...? > > > > Marc > > > > ----- Original Message ----- > > From: "Teqila MAN" <teqilaman@poczta.wp.pl> > > To: <php-general@lists.php.net> > > Sent: 30 September 2001 16:22 > > Subject: [PHP] still problem with getting HIGHest and LOWest VALUES > > > > > > > The table has values : > > > > > > id - price > > > 1 - 150000 > > > 2 - 24000 > > > 3 - 65000 > > > 4 - 200000 > > > > > > > > > When i want to sort it > > > > > > $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena"); > > > while ($row = mysql_fetch_array($x)) > > > { > > > $id=$row["id"]; > > > $price=$row["price"]; > > > print("$price<br>\n"); > > > } > > > > > > It returns me values : > > > 150000 > > > 200000 > > > 24000 > > > 65000 > > > > > > What is false! It sorts this by getting first values ? How to fix it ? > > > > > > Thanks for your help > > > tm. > > > > > > > > > -- > > > 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 > > > > > > > > > -- > > 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 > > > > > > > -- > 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 (#69383) next »