For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2004 > Request for help on (My)SQL Statement









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Request for help on (My)SQL Statement
John Bedard

2004-04-27, 7:48 pm

:::Novice Alert:::

I've done simple select and insert statements, so I suppose this is the most complicated thing I've tried to do. but seems to me it should be pretty easy. But I'm a designer by background, not a developer or programmer. I've got everything else I'm trying to do working.

I'm trying to take the largest value out of one table and update another table. The former is a PHPBB table and the latter is a table I created just to store the value of the date of the most recent post for use in something else.

UPDATE ngc_polling SET lastrundate = max(nuke_phpbb_posts.post_time)

It returns "Invalid use of group function."

I've been looking at the documentation on MySQL.com to no avail. I'm testing my query in phpMyAdmin before I try to implement it elsewhere. This is what I'm trying to do, any help besides "RTFM" (been doing that) would be greatly appreciated.

Thanks!

John

John Bedard | Interaction Designer (SWEIII) | Northrop Grumman Mission Systems | Helena, Montana, U.S.A. | john.bedard@ngc.com | 406.443.8630 | Fax 406.443.8601 |


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com