I've got an error saying that" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM table_A INNER JOIN table_B ON table_A.name = table_B.name' at line 1 "
The sql query is :
$sql="UPDATE table_A SET table_A.quantity = table_A.quantity - table_B.quantity FROM table_A INNER JOIN table_B ON table_A.name = table_B.name WHERE table_B.status = 'APPROVED'"; Please help me out of this error. Thank you.
INNERinstead ofINNER JOINUPDATElike that inMySQL- see this question for the correct syntax: stackoverflow.com/questions/1262786/…MySql