mysql count error
Hejsa,Jeg har en query der checked om en given kode findes i en tabel, men modtager denne fejl:
Warning: mysql_result(): Unable to jump to row 1 on MySQL result index 6 in /home/ms01/public_html/upload.php on line 94
Kode:
// Security image validation
$security_query = mysql_query("SELECT COUNT(*) FROM securityimage WHERE ip='$ip' AND code='$code' ") or die (mysql_error());
$security_query = mysql_result($security_query, 1);
if($security_query == 0) {
// Post error message
$status = 71;
include "/home/savemov/include/status_error.php";
exit();
}else{
// Delete security code
mysql_query("DELETE FROM securityimage WHERE ip='$ip' AND code='$code' ") or die (mysql_error());
}
