Re: select the max value
| From: | Tom Rogers | Date: | Mon, 21 May 2001 08:59:24 +0000 |
| Subject: | Re: select the max value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53684@lists.php.net to get a copy of this message | ||
Hi
try:
select * from score order by scorevalue DESC LIMIT 1
or if your db supports sub selects:
select * from score where scorevalue=(select MAX(scorevalue) from score)
Tom
At 03:38 PM 21/05/01 -0500, Jacky wrote:
Hi all Is this the corerct way of selecting the max value in a table? "select * from score where MAX(scorevalue)" cheers Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"