Following are my sql queries that are updating values in same table. I want to embed these two query in one and i was unable to do that. Kindly let me know how can i do so , Thanks:
$SQL1 = "UPDATE table1 SET gender='$sex', dob = '$dob', reg_date ='$reg_date'
WHERE id = '$id'"
$SQL2 = "UPDATE table1 a CROSS JOIN lookup b
SET a.ADRES = REPLACE(a.ADRES, b.`WRONG`, b.`RIGHT`)
WHERE a.ADRES LIKE CONCAT('%', b.`WRONG`, '%')"
the query is vulnerable with
SQL Injection, please see the article below to lear how to protect from it,