Re: [PHP-DB] Updating a table when using LEFT JOIN

2004-08-29 Thread ioannes
t; To: <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 5:13 AM Subject: Re: [PHP-DB] Updating a table when using LEFT JOIN From the Mysql docs: Starting with MySQL 4.0.4, you can also perform UPDATE operations that cover multiple tables: UPDATE items,month SET items.price=month.price WHER

Re: [PHP-DB] Updating a table when using LEFT JOIN

2004-08-26 Thread Micah Stevens
From the Mysql docs: Starting with MySQL 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; The example shows an inner join using the comma operator, but multiple-table UPDATE statements can use

[PHP-DB] Updating a table when using LEFT JOIN

2004-08-26 Thread Chris Payne
Hi there everyone, I am using the following to grab the data I need from several tables: $sql = "SELECT * FROM vendorprices LEFT JOIN fooditems on (vendorprices.FoodItemNumber = fooditems.FoodItemID) WHERE vendorprices.VendorNumber='$VendorID' ORDER BY vendorprices.VendorItemNumber"; Th