Ex I want to a value of 2 in that field. The comma separated saved in a group_id and I don’t want to match 3 or 4
Table name : tbl_user
user_id | group_id | created | updated |
---|---|---|---|
3 | 1,2,3,4 | 2016-07-19 15:09:09 | 2016-07-19 15:09:09 |
2 | 3,4 | 2016-07-19 15:08:09 | 2016-07-19 15:08:09 |
1 | 1 | 2016-07-19 15:08:07 | 2016-07-19 15:08:07 |
Mysql Query :
1 2 3 4 5 |
select * from tbl_user where FIND_IN_SET('2', group_id); |
More Stories
How to reset or change the MySQL root password?
Incorrect datetime value: ‘0000-00-00 00:00:00’ for column
MySQL String Functions