Get the lowest value out of different fields

From: Date: Wed, 03 Sep 2003 19:14:28 +0000
Subject: Get the lowest value out of different fields
Groups: php.general 
Request: Send a blank email to php-general+get-161583@lists.php.net to get a copy of this message
Hi All, I hope you can help me with this: 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' . I can't figure out if i can do this into a SQL statement or put it in an Array and sort it.. Please help! Frank

« previous php.general (#161583) next »