Hi all . I used to use this script with php4 and now i moved to php5 and i keep getting following error.could any one tell me how to fix it.Thanks

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \country.php on line 25
-
pointing at:
// Fetching the record set into an array
$ccode_array=mysql_fetch_array($country_exec);
PHP Code:
<?

    //---------------------------------------------------
    // Sample code to display Visitor Country information 
    //  
    //---------------------------------------------------


    // Establishing a database connection
    $dbh=mysql_connect("localhost","root","");
    mysql_select_db("ip2country");


    // Query for getting visitor countrycode
    $country_query  = "SELECT country_code2,country_name FROM iptoc ".
         "WHERE IP_FROM<=inet_aton('$REMOTE_ADDR') ".
          "AND IP_TO>=inet_aton('$REMOTE_ADDR') ";


    // Executing above query
    $country_exec = mysql_query($country_query);


    // Fetching the record set into an array
    $ccode_array=mysql_fetch_array($country_exec);


    // getting the country code from the array
    $country_code=$ccode_array['country_code2'];


    // getting the country name from the array
    $country_name=$ccode_array['country_name'];


   // Display the Visitor coountry information
   echo "$country_code - $country_name";


   // Closing the database connection
   mysql_close($dbh);


?>