I am trying to simplify an SQL query that is pretty much like below:
$sql = SELECT * FROM table WHERE keyword RLIKE '$expression1' OR
keyword RLIKE '$expression2' ;
The different terms '$expression1' and '$expression1' come from an array.
Is there any way to within one regular expression to
[snip]
I am trying to simplify an SQL query that is pretty much like below:
$sql = SELECT * FROM table WHERE keyword RLIKE '$expression1' OR
keyword RLIKE '$expression2' ;
The different terms '$expression1' and '$expression1' come from an
array.
Is there any way to within one regular
IN ( exp1, exp2) didn't seem to work for me. I've seen that used
before for including a subquery, but somehow it didn't like the comma
separated list.
I think this below is doing it for me.
$separated = implode(|, (explode( ,
(AddSlashes($_REQUEST['terms']);
Brian Anderson wrote:
IN ( exp1, exp2) didn't seem to work for me. I've seen that used
before for including a subquery, but somehow it didn't like the comma
separated list.
I think this below is doing it for me.
$separated = implode(|, (explode( ,
(AddSlashes($_REQUEST['terms']);
4 matches
Mail list logo