and because there is always more than one solution, here comes my prefered one :-))
<?
if (! $link_id=mysql_pconnect($MySQL_Host, $MySQL_User, $MySQL_Passw))
{
echo "No Connection made to the DB Server";
exit;
}
if (!mysql_query("use " . $db_name, $link_id))
{
echo "The DB requested does not exist";
}
$query = "Select whatever you want";
$select_id = mysql_query($query, $link_id);
// Here comes what you need
$number_of_results = mysql_num_rows($select_id);
...
cya Rob