[Solved] One Update query for all updates [closed]


UPDATE  table1 a CROSS JOIN lookup b
 SET    a.ADRES = REPLACE(a.ADRES, b.`WRONG`, b.`RIGHT`),
        gender="$sex", 
        dob = '$dob', 
        reg_date="$reg_date"
 WHERE  a.ADRES LIKE CONCAT('%', b.`WRONG`, '%') OR 
        id = '$id'

the query is vulnerable with SQL Injection, please see the article below to lear how to protect from it,

  • How can I prevent SQL injection in PHP?

3

solved One Update query for all updates [closed]