Table name: `team`
Column name: `team_members`
Column value1: 1,72,34 //these are userids [Row1]
Column value2: 72,38 [Row2]
Column value2: 10,3 [Row3]
Now I want to match if login user's id exists in team_members
or not.
For this, I fire a query as below :
<?php
$loginuserid = 72;
$query = 'SELECT * FROM `team` WHERE `team_members` IN ("'.$loginuserid.'")';
?>
Expected Result:
It must return 2 rows: 1 and 2
But it is not working like this. It returns only row1.
Kindly, suggest the solution.