mysql_pconnect( "webdb0.cc.andrews.edu", "miscweb", "miscweb") or die( "Unable to connect to SQL server");
mysql_select_db("miscweb") or die ( "Unable to select database");
//
function build_table($event, $anchor){
echo "
".$event." |
";
$SQL = "SELECT name, num_attending FROM rsvp_dedication_sabbath WHERE event = '".$event."';";
$result = mysql_query($SQL);
if(mysql_num_rows($result)>0) {
while ($row = mysql_fetch_row($result)) {
echo "";
for ($i=0; $i";
// test if this is the URL
if ($i == 7) {
echo "$row[$i]";
}else{
echo "$row[$i]";
}
echo "";
}
echo "
\n";
}
}else{
echo "| No one has signed up yet. |
";
}
$result2 = mysql_query( "SELECT num_attending FROM rsvp_dedication_sabbath WHERE event = '".$event."'");
while ($row = mysql_fetch_row($result2)) {
for ($i=0; $i Total is: ".$total." | ";
echo "
";
}
?>
| build_table("Dedication Sabbath"); ?> |