If I want to make an update query using INNER JOIN
, how do I do in this case:
I have a users
table & user_settings
table. users
contains column id
and user_settings
contains column userid
. I want to do like:
UPDATE users_settings SET commets = 0 WHERE email = "$email";
But user_settings
does not contain email
, so I want to pick the email
from the users
table where the id
is userid
.