Help with Php MySqL Flash tutorial

Hello, i’m new here and i have a problem right at the beginning.
I just can’t get this little script from this tutorial to work:
I created the database on my server, executed the query properly, the connection seems to be fine, but i have no data on the flash movie, if i hit directly sites.php on the browser i get this warning:

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /mylink/sites.php on line 10
**Database Output

[LEFT]here’s a bit of the code:

@mysql_select_db("****") or die( "Unable to select database");
$query="SELECT * FROM contacts";

$num=mysql_numrows($result); // the warning


Please help i really need this to work…