se non sbaglio... mysql_num_rows($risultato); se non trova nessuna riga restituisce false ...