usa mysql_num_rows() se ti restituisce 0 significa che non ha prodotto alcun risultato