I have this in my BD:
following: 12,13,2,4 (this is the user id of the following list of one user)
and I want to count how many followers has a single user.
I have this code:
$followers = $db->fetch_field($db->simple_select('users', 'COUNT(*) AS followers' , "buddylist IN ($useruid) "), 'followers');
$Followers = $followers;
This only works if the first number of the list is the same that $useruid. Example:
$useruid = 1, buddylist = 3,2,1
$followers = $db->fetch_field($db->simple_select('users', 'COUNT(*) AS followers' , "buddylist IN ($useruid) "), 'followers');
$Followers = $followers;
the out put its 0
if buddylist is 1,2,3
the output is one.
What's wrong? :(