Re: Update Statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one cooked me 2 when I realised my online by was 3x and local was 4x

only 4+ supports a join on an update statement

from the manual

Starting with MySQL Version 4.0.4, you can also perform UPDATE operations that cover multiple tables:

UPDATE items,month SET items.price=month.price
WHERE items.id=month.id;

pete

Ng Hwee Hwee wrote:
hi all,

I would like to do the following:

update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no

however, i found that multiple updates can only work for MySQL version 4.0.4 but mine is 3.23.54... can anyone enlighten me on how I can achieve the same results with this older MySQL version? or can PHP 4.2.2 help me in any way?

Thank you so much!

Hwee

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux