RE: [PHP] getting the highest number in 3 db fields?
| From: | Dennis Seavers | Date: | Fri, 19 Nov 2004 06:46:01 +0000 |
| Subject: | RE: [PHP] getting the highest number in 3 db fields? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202488@lists.php.net to get a copy of this message | ||
Try using the SQL aggregate function MAX() or the PHP function max()
> [Original Message]
> From: Louie Miranda <lmiranda@gmail.com>
> To: <php-general@lists.php.net>
> Date: 11/18/2004 11:34:57 PM
> Subject: [PHP] getting the highest number in 3 db fields?
>
> I have a db field of 3.
>
> - prolog
> - transmodal
> - asian
>
> I wish to get the highest number of those three, in different fields.
>
> Im thingking of..
>
> if (row0 =< row1) ...
>
> how about row2?
>
> confused..
>
> --
> Louie Miranda
> http://www.axishift.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php