i cant seem to get this code to work:
for($j=0; $j<$online_total; $j++ )
{
$buddy = mysql_result($online_result,$j, 0);
$is_online_query = "select username from users WHERE username = '$buddy' AND online= 'y'";
$is_online_result = mysql_query($is_online_query);
$is_online_total = mysql_num_rows($is_online_result);
if($is_online_total != '0')
{
echo "<table cellpadding=0 cellspacing=0 border=0>";
echo "<TR><TD background=\"/dining/images/dotted_back.gif\">
<img src=\"/dining/images/elbow.gif\"></TD><TD>";
echo "<a href=profile.php?id=$buddy target=\"bigone\" class=children>$buddy</a>";
echo "</TD></TR>";
echo "</table>";
}
}
it keeps returning the following error:
Unable to jump to row 0 on MySQL result index
can anyone see what i am missing here. thanks in advance.