Friday, May 3, 2013

mySQL mulitple table update

UPDATE config, tmp_config
SET
 config.new1 = tmp_config.new1,
 config.new2 = tmp_config.new2
WHERE tmp_config.tmp_id = config.id

UPDATE account, vtiger_accountshipads 
SET account.acc_shipping_address=vtiger_accountshipads.ship_street, account.acc_shipping_po_box=vtiger_accountshipads.ship_pobox, account.acc_shipping_city=vtiger_accountshipads.ship_city , account.acc_shipping_state=vtiger_accountshipads.ship_state, account.acc_shipping_postal_code=vtiger_accountshipads.ship_code , account.acc_shipping_country=vtiger_accountshipads.ship_country
WHERE vtiger_accountshipads.id=account.acc_id

No comments:

Post a Comment

About

Blogger templates