<?
$host = "localhost";
$user = "mmaaaco_ksecor";
$pass = "hamilton";
$dbname = "mmaaaco_mydb";
$db = @mysql_connect($host, $user, $pass);
$result = @mysql_select_db($dbname,$db);

echo "<table border = \"1\"><tr><th>Store</th><th>Sales</th></tr>";
$sql = mysql_query("SELECT * FROM stores");
while ($row = mysql_fetch_array($sql))
	{
	echo "<tr><td>$row[store]</td><td>$row[sales]</td></tr>";
	}
echo "</table>";





$sql = mysql_query("SELECT sum(sales) FROM stores");

while ($row = mysql_fetch_array($sql)) {
echo "$row[0] <br />";
}

?>
