hmmm....
Well now Im all embarassed -- It says no Database selected......I'm connecting the same way I normally do...but I'm sure there was something simple here Im overlooking.......
Full on code:
<?
$usr = "username";
$pwd = "password";
$db = "database";
$host = "localhost";
# connect to database
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); }
$division = "Featherweight";
$league = "Sunday";
$hometeam = "Fox Lake";
$result = mysql_query("SELECT * FROM schedules WHERE league = '$league' AND division = '$division' AND hometeam = '$hometeam' AND homescore > awayscore")or
die(mysql_error());
$num_rows = mysql_num_rows($result);
echo "$num_rows Wins\n";
?>
Working Now and I changed it to:
<?
$dbuser="userinfo";
$dbpass="password";
$dbname="database name"; //the name of the database
$cid = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $cid) or die ($dbname . " Database not found." . $dbuser);
$division = "Featherweight";
$league = "Sunday";
$hometeam = "Fox Lake";
$result = mysql_query("SELECT * FROM schedules WHERE league = '$league' AND division = '$division' AND hometeam = '$hometeam' AND homescore > awayscore", $cid)or
die(mysql_error());
$num_rows = mysql_num_rows($result);
echo "$num_rows Wins\n";
mysql_close($cid);
?>
Thank you Nevermind very much for getting the juices flowing and helping me sort this out!!!