My code
function check_friend($userid, $friendid) {
$sql = "SELECT userid FROM friend_friend
WHERE userid='$userid'
AND friendid='$friendid'
AND status='1'
LIMIT 1";
$result = executeQuery($sql);
return mysql_result($result, 0) != 0;
}
this line
return mysql_result($result, 0) != 0;
}
gives me this error sometimes
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 11 in /home/friend/public_html/config/functions.inc.php on line 1813
How can I fix this?