La funzione che ti restituisce l'array associativo ( tipo mysql_fetch_array ) ritorna false se nn trova nessun valore.

ciao