Crazydog
12-28-2006, 07:25 AM
This is part of a script I'm writing:
$query2 = "SELECT * FROM added WHERE NeedToAdd='$ip2'";
$result2 = mysql_query($query2);
$ips=mysql_result($result2,0,"AddedTheirCode");
I'm running a while statement on all the data that is being displayed, and those three lines are run on each one.
If the certain data's "$ip2" is not in the "added" table in the "NeedToAdd" column, I get a Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8
error.
Is there any way I can exclude data whose "$ip2" is not in the "added" table in the "NeedToAdd" column? Or just someway to stop that error from showing? (I can't edit any config files)
$query2 = "SELECT * FROM added WHERE NeedToAdd='$ip2'";
$result2 = mysql_query($query2);
$ips=mysql_result($result2,0,"AddedTheirCode");
I'm running a while statement on all the data that is being displayed, and those three lines are run on each one.
If the certain data's "$ip2" is not in the "added" table in the "NeedToAdd" column, I get a Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8
error.
Is there any way I can exclude data whose "$ip2" is not in the "added" table in the "NeedToAdd" column? Or just someway to stop that error from showing? (I can't edit any config files)