Wednesday 28 March 2012

how to update value using join between two tables in mysql

This example may be help full for you.

UPDATE xcart_products INNER JOIN xcart_extra_field_values
ON xcart_extra_field_values.productid = xcart_products.productid
SET xcart_products.forsale = 'N'
WHERE xcart_extra_field_values.value = 'article' and xcart_extra_field_values.fieldid=1

0 comments:

Post a Comment