Howdy, Multiple table updates are not available in MySQL. I had the same problem and it was driving me crazy...
I suggest you try combining your nice query with some PHP code, did work for me! :) good luck, Maarten Roosen > > -----Original Message----- > From: Phil Kernick [mailto:[EMAIL PROTECTED]] > Sent: woensdag 18 september 2002 7:36 > To: [EMAIL PROTECTED] > Subject: Multi-table updates in MySQL > > > I'm using MySQL v3.23.52. > > I want to update a column in one table to be based on a calculated expression > from a column in another table. > > Specifically I want something like this: > > mysql> update a set a.f1=b.f1 where a.f2=b.f2; > mysql> update a, b set a.f1=b.f1 where a.f2=b.f2; > > The first says table b is unknown, the second doesn't let there be multiple > tables in an update. > > While I could do this programatically using PHP or Perl, it feels like this is > something sensible to do in a single line. > > If there is a way to do this, please let me know directly as I'm not > subscribed to the list. > > > Thanks, > Phil. > > -- > _-_|\ Phil Kernick E-Mail: [EMAIL PROTECTED] > / \ ROTFL Enterprises Mobile: 041 61 ROTFL > \_.-*_/ > v Humourist, satirist, and probably a few more 'ists to boot! > > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- 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