every rows having multiple ids separated by comma. i want to select rows by id.
Database is like this:
R.No | User_Ids
-----|---------
1 | 38,323,45
-----|----------
2 | 382,535,338
-----|------------
3 | 32,38
-----|----------
4 |238,388,2394
if selected id is 38 then i need result as below:
R.No | User_Ids
-----|---------
1 | 38,323,45
-----|----------
3 | 32,38
i have used this query.
$sql="select User_Ids from table_name where User_Ids RLIKE '[[:<:]]".$Id."[[:>:]]'";
It is giving error as Illegal argument to a regular expression.