#12 Aug 2010 - require("/usr/home/jrnetc/www/htdocs/php/login.inc"); #Local variables $cata_page = "wine_note.php"; chop($cata_page); #SQL statement $SQL = " SELECT * FROM wine, region_table"; $SQL = $SQL . " WHERE wine_index and wine.wine_region = region_table.region_id order by wine_index desc"; #Connect to database, retrieve query results @ $cid = mysql_pconnect($host,$usr,$pwd); if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); } mysql_select_db("$db"); # execute SQL statement $result = mysql_query($SQL); #Total number of "wines" $num_results = mysql_num_rows($result); #Display results in table, rows echo ("
| Date | "); echo ("Wine | "); echo ("Producer | "); echo ("Region | "); echo ("
| $tasting_date | "); echo ("$wine_name $wine_vintage | "); echo ("$wine_producer | "); echo ("$wine_region | "); echo ("