I've now had an extended dig around this mailing list's archive, and it I conclude mySql can not perform this type of update directly. Instead I should create a temp table, select into the temp table and then use that to do a REPLACE INTO command.
Can someone confirm my conclusion is correct? Thanks, Charles. -----Original Message----- From: Charles Allen [mailto:[EMAIL PROTECTED]] Sent: 21 November 2001 14:29 To: Mysql (E-mail) Subject: Newbie query Hi, A v. basic question from a mySql newbie: I want to update a table based on the contents of another table. The SQL I am trying to execute is: "update servers set servers.responsecount=servers.responsecount+1 where servers.gameid = lastsnapshot.gameid;" ie: Increment a responsecount for rows where the gameid in the servers table matches the gameid in the lastsnapshot table. I am getting a "Unknown table lastsnapshot" error from mySql. Can someone point me in the right direction for this. Thanks, Charles. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php