-1
How to update two tables, e.g.: first table users
, would update only on senha
, but on the table users_info
would update cos fields, cidade
, nascimento
, sexo
and etc.
I can do it in one, but I wanted to do both in one operation, I read about INNER JOIN
, but did not understand very well to update
UPDATE ?? SET ?? = ? WHERE ?? = ?
Join in the update syntax is not for your situation. In your case, two update commands must be executed, which you can do, is to place these two commands inside a transaction, and thus make sure that the two will be executed correctly.
– Rovann Linhalis
This question has been answered in https://answall.com/questions/233300/update-inner-join-php-mysql/233321#233321
– Alexandre Cavaloti