$query= "UPDATE details
SET password
AND cpassword = (SELECT newpassword
, cpassword
FROM resetpassword
WHERE resetpassword.email = details.email)
WHERE email = email";
Asked
Active
Viewed 44 times
0

Strawberry
- 33,750
- 13
- 40
- 57

user1992
- 1
- 4
-
I need to set two fields in details table but its not affecting, if i give one column name its affecting only for that – user1992 Aug 10 '15 at 09:51
-
Edit your question accordingly. – Strawberry Aug 10 '15 at 09:52
-
See this : http://stackoverflow.com/questions/5985264/mysql-update-multiple-columns-with-a-select-returning-multiple-rows – PaulF Aug 10 '15 at 10:26