problema: io faccio una cosa del genere
$query="SELECT count(*) as tot from utenti where username=".$_POST['username'];
$dati = mysql_query($query, $db);
$array = mysql_fetch_array($dati);
e poi testo $array[tot] ma se tot è 0 mi dà
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource