This actually makes my phpmyadmin stop working.
SET @admin_mail = "mail@mail.com";
-- 5. SET ORDER MAIL
UPDATE
sales_flat_order,
sales_flat_order_address,
-- sales_flat_order_status_history,
sales_flat_quote,
sales_flat_quote_address
SET
sales_flat_order.customer_email = @admin_mail,
sales_flat_order_address.email = @admin_mail,
sales_flat_quote.customer_email = @admin_mail,
sales_flat_quote_address.email = @admin_mail;
You cannot update multiple tables from one statement. You can enter multiple tables into a single SQL
UPDATEstatement like aJOIN, but you may only actually update values in one of the tables.You will have to do this:
etc…
Here is a good thread related to this: How to update two tables in one statement in SQL Server 2005?