RE: [PHP] Get the lowest value out of different fields
| From: | Jay Blanchard | Date: | Wed, 03 Sep 2003 19:28:29 +0000 |
| Subject: | RE: [PHP] Get the lowest value out of different fields | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161585@lists.php.net to get a copy of this message | ||
[snip]
I have a tabel in my database like this
TEST
fieldname Value's
testid 1
testf1 3
testf2 4
testf3 0
testf4 2
testf5 0
(so this is one record!)
I want to display the lowest value, except 0.. So the SQL statement will
be SELECT testf1, testf2, testf3, testf4, testf5 FROM test where
testid='1' .
[/snip]
Use http://us2.php.net/min