RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-28 Thread John.Bedard
place. Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 6:23 PM To: Bedard, John Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Request for help on (My)SQL Statement Well then there's no reason to copy the value. Just sele

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
and isn't a total abomination... :) > > Thanks, > > John > > -Original Message----- > From: Micah Stevens [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 27, 2004 5:30 PM > To: Bedard, John > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Request for help o

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Rachel Rodriguez
> > John, you're getting that error message because the > max() function requires a GROUP BY clause. > Ooops, my bad. It requires a GROUP BY if you are pulling from more than one column. = ~Rachel __ Do you Yahoo!? Win a $20,0

RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread John.Bedard
t; Thanks, > > John > > -Original Message- > From: Micah Stevens [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 27, 2004 5:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Request for help on (My)SQL Statement > > > > That would be the way to

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Rachel Rodriguez
> 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

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
iginal Message- > From: Micah Stevens [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 27, 2004 5:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Request for help on (My)SQL Statement > > > > That would be the way to do it except that MySQL doesn't support > sub

RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread John.Bedard
Okay, I'll go in that direction. Thanks! John -Original Message- From: Swan, Nicole [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 5:17 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Request for help on (My)SQL Statement You're right, of course, Micah. I guess

RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Swan, Nicole
PROTECTED] Sent: Tuesday, April 27, 2004 5:00 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Request for help on (My)SQL Statement That would be the way to do it except that MySQL doesn't support sub-selects until version 4.1, which is in alpha still. -Micah On Tuesday 27 April 2004 04:05 pm

RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread John.Bedard
So you're saying there's no way to do it in this version with a single statement? Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 5:00 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Request for help on (My)SQL Stateme

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
That would be the way to do it except that MySQL doesn't support sub-selects until version 4.1, which is in alpha still. -Micah On Tuesday 27 April 2004 04:05 pm, Swan, Nicole wrote: > Have you tried a nested query? I think your problem is that you're really > using information from two diffe

RE: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Swan, Nicole
Have you tried a nested query? I think your problem is that you're really using information from two different tables. Maybe: UPDATE ngc_polling SET lastrundate = (SELECT max(post_time) FROM nuke_phpbb_posts); --Nicole --- Nicole Swan Web Programming Specialist Carroll