Throught our website many times we like to check to see if information exists in a table with a piece of code like this... if (mysql_num_rows(mysql_query( "SELECT * FROM extra_logros WHERE date = '$today' AND sector_id = '$sect_id' AND ward_id = $ward_id; ")) < 1) I am checking to see if there is a row in the table that matches the criteria. If it does not exist then the next line of code creates and if it does exist then obviously I am doing something with the code. With PHP 4 I am not sure if we had errors off or what, but all went well. On our new server with PHP 5, the code still works and all the information gets passed, BUT I get a nice little error at the top of the screen that says: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/apache/htdocs/solomon/lib/Write.php on line 545 Ok, fine I understand that it's mad that the result is NULL I guess, but that's fine with me. I want it to be NULL. My qestuion is: Is there a different way to write the code so I don't get the error? OR Can I turn off the Warnings for situations such as this? The page works, I just get a little stupid error at the top of the screen. >:(