|
ALMA Relevant Science Meetings/Events';
mysql_select_db('naalmacal') or die('Could not select database');
// Performing SQL query
$monthnames = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2008 order by 1/month';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2008)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
// Free resultset
?>
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2007 order by month,day';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2007)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
// Free resultset
?>
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2006 order by month';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2006)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
// Free resultset
?>
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2005 order by month';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2005)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
// Free resultset
?>
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2004 order by month';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2004)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
?>
$query2 = 'SELECT month, day, title, url, description, email, location FROM calendarix_events where cat=2 and year=2002 order by month';
$result2 = mysql_query($query2) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo("Meetings/Events (2002)");
echo("");
echo("");
echo("Starting Month | ");
echo("Starting Day | ");
echo("Meeting Event | ");
echo("Event Description | ");
echo("Contact email | ");
echo("Event Location | ");
echo(" ");
$prevtitle="";
while ( $row = mysql_fetch_array($result2) )
{
extract($row);
if ($prevtitle == $title) { continue; }
$prevtitle=$title;
echo("");
echo("$monthnames[$month] | ");
echo("$day | ");
if (strlen($url) > 0) {
echo("$title | \n");
}
else {
echo("$title | \n");
}
echo("$description | ");
echo("$email | ");
echo("$location | ");
echo(" ");
}
echo(" ");
// Free resultset
?>
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
|