I need to write a query to update two mysql tables simultaneously ie:
i have two tables:
Table1 and Table2.
and each of the these tables have a realting field... So i tried writing a update query this way.

Update TABLE1,TABLE2 SET TABLE1.field1 = 'aaaa' , TABLE2.field1='bbb' Where TABLE1.field2 = 12 and TABLE1.field1=TABLE2.field1

But this query showed me an error.. i can do this breaking into 2 queries, but i want it to be done in one single go... any idea on this??

Thanking you in advance..