Shouldn't this be "UPDATE header SET parent='$this->parent' WHERE posted = max(posted)"
Otherwise the max(posted) = max(posted) is true for all records (therefore all records get updated) Andrew ----- Original Message ----- From: "Martin Clifford" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 8:11 PM Subject: Re: [PHP] newbie: mysql statement I would rewrite the query as: "UPDATE header SET parent='$this->parent' WHERE max(posted) = max(posted)" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php