Re: [PHP-DB] Update Statement

2004-02-18 Thread Ng Hwee Hwee
hwee - Original Message - From: "Ricardo Lopes" <[EMAIL PROTECTED]> To: "Ng Hwee Hwee" <[EMAIL PROTECTED]> Cc: "PHP DB" <[EMAIL PROTECTED]> Sent: Wednesday, February 18, 2004 5:41 PM Subject: Re: [PHP-DB] Update Statement > you could

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ricardo Lopes
you could use: for ($i=0; $i< max; $i++) { mysql_query("update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no"); } OR if you use mysqlt daemon (support for transactions, in this case is best) mysql_query('BEGIN'); for ($i=0; $i< max; $i++) { if (! mysql_quer