Ho risolto dovevo usare mysqli_fetch_object() invece usavo mysql_fetch_object()....