$hostname = "stobbrau.netfirmsmysql.com:3306";
$username= "u70606397";
$password= "6bd0ca";
$dbid="d60544129";
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die ("Unable to connect to MySQL");
//print "Connected to MySQL
//";
//mysql_close($link);
?>
// setup SQl statment
$SQL = " SELECT beerName FROM `ItemBeer` WHERE dateDrink = ( SELECT MAX( dateDrink ) FROM ItemBeer ) ";
// $SQL = " SELECT beerName, comments FROM `ItemBeer` WHERE dateDrink = ( SELECT MAX( dateDrink ) FROM ItemBeer ) ";
// execute statement
$newones = mysql_db_query($dbid, $SQL, $link);
// display
// if (!$totnum) {
// echo "Could not successfully run query ($sql) from DB: " . mysql_error();
// exit;
//}
while ($row = mysql_fetch_array($newones)) {
$beer = $row["beerName"];
echo "o) $beer ";
}
?>
Beer List
Here are some of the beers that I have had the pleasure of trying, though not
a compete list, as sometimes, I become 'distracted' after trying a few.
This listing of beers is not very technical and is intended solely for
entertainment purposes.
The Table
This table can be dynamically sorted in a
number of ways just by clicking on a column header. To reverse the sort order
for a given column, click on it twice in a row.
Total Beers
// setup SQl statment
$SQL = " SELECT COUNT(*) FROM ItemBeer ";
// execute statement
$totnum = mysql_db_query($dbid, $SQL, $link);
// display
// if (!$totnum) {
// echo "Could not successfully run query ($sql) from DB: " . mysql_error();
// exit;
//}
echo mysql_result($totnum, 0);
?>