RE: [PHP] Get the lowest value out of different fields
| From: | Jennifer Goodie | Date: | Wed, 03 Sep 2003 20:12:10 +0000 |
| Subject: | RE: [PHP] Get the lowest value out of different fields | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161589@lists.php.net to get a copy of this message | ||
> BUT how can i make the function loop through the whole
> result?
>
> -----------------------------------
> if (mysql_num_rows($result3) > 0)
> {
> $test = mysql_fetch_array($result3);
> echo minnum($test);
> }
>
> --------------------------------------
>
Someone will probably come up with something a little cleaner, but quick and
dirty...
if (mysql_num_rows($result3) > 0)
{
while ($row = mysql_fetch_array($result3)){
$min[] = minnum($test);
}
$overall_min = minnum($min);
}