$sql2 ="UPDATE table1,table2 SET table2.password2 = ".password_hash(."table1.password1".,PASSWORD_DEFAULT)." WHERE table1.username = table2.username";
I am trying to use Php functions in Mysql update queries instead of iteration, but it doesn't seem to work. Please let me know if there is anyway I can achieve this without iteration, if with Stored procedures I can, please give a small example as I have never made a stored procedure before, thanks in advance