Hi Guys,

My count is echoing the $count variable as 0 when it should be 1. When i run the MySQL Query myself in PHPMYADMIN it returns a row. So why when i echo $count is it showing as 0? Any help would be great. Thanks in advance!

PHP Code:
//Get Valid Consumer ISP
        
$query2 "SELECT * FROM `ValidISP` WHERE `ISP` = '$ipisp'";
        
$result2=mysql_query($query2);
        echo 
$query2."<br/>";
        
$count=mysql_num_rows($result2);
        echo 
$count."<br/>";
        if(
$count==1){
            while(
$row2 mysql_fetch_array($result2))
            {
                
$validisp=$row2['ISP'];
                
$validispstatus=$row2['Status'];
            }
        }else {
            
$validispstatus="MANUALCHECK";
            }
      
//End
      
        
if ( $validispstatus == "PASS" ) {
            
$query3 "UPDATE leads SET IPCheck='PASS' WHERE LeadID='$leadid'";
            
mysql_query($query3);
        } elseif ( 
$validispstatus == "FAIL" ) {
                
$query3 "UPDATE leads SET IPCheck='FAIL' WHERE LeadID='$leadid'";
                
mysql_query($query3);
        } else {
                
$query3 "UPDATE leads SET IPCheck='MANUAL' WHERE LeadID='$leadid'";
                
mysql_query($query3);
               } 
Example:

ispcheck1.jpg
ispcheck2.jpg