Why does the code below returns 1 although there is no elements in the field group_members ?
$conn = mysql_connect($host,$user,$pass);
@mysql_select_db($db);
$sql = "
SELECT
group_members
FROM
tbl_group
WHERE
group_id = '6'
";
$res = mysql_query($sql);
$rows = mysql_num_rows($res);
echo $rows;
?>
The SQL you wrote will select all rows with
group_id = 6and then return the value of the fieldgroup_membersregardless the content. To get what you want, try: