Re: Request for help on (My)SQL Statement
| From: | Rachel Rodriguez | Date: | Wed, 28 Apr 2004 00:01:59 +0000 |
| Subject: | Re: Request for help on (My)SQL Statement | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34131@lists.php.net to get a copy of this message | ||
> UPDATE ngc_polling SET lastrundate =
> max(nuke_phpbb_posts.post_time)
>
> It returns "Invalid use of group function."
>
John, you're getting that error message because the
max() function requires a GROUP BY clause.
Try this:
SELECT max(nuke_phpbb_posts.post_time)
FROM nuke_phpbb_posts
GROUP BY nuke_phpbb_posts.post_time;
=====
~Rachel
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover