Couldnt figure out how to replace values of a conditions in a sql query with PHP ,
Example:
SELECT *
FROM table
WHERE a=1
and a = '2'
and a= "3"
and a LIKE '%a'
and a LIKE "a%"
and a < 1
and a<1
and a >1
and a >1
HAVING a <1
So expected output will be
SELECT *
FROM table
WHERE a=?
and a = ?
and a= ?
and a LIKE ?
and a LIKE ?
and a < ?
and a<?
and a >?
and a >?
HAVING a <?
my failed pattern is:
#(like|<|>|=){1}[\s]{0,1}['"\s"]{0,1}(.*?)['"\s"]{0,1}#si