<?
// called from: all programs which need to process all appointments for a given project
//
$GetApptSQL = "SELECT distinct appt_id, appointment.information, month, day, year FROM appointment, project, apptxproj WHERE xproj_id = '$id' AND xproj_id = proj_id AND appt_id = xappt_id ORDER by month, day, year, time";
$GetAppt = mysql_query($GetApptSQL);
if ($getappt = mysql_fetch_array($GetAppt)) {
print("<br><b>Appointments Associated With Project:</b><br>");
printf("%s-%s-%s <a href=\"updappt.php?id=%s&Mon=%s&Day=%s&Year=%s\">%s</a><br>", $getappt["month"], $getappt["day"], $getappt["year"], $getappt["appt_id"], $getappt["month"], $getappt["day"], $getappt["year"], $getappt["information"]);
while ($getappt = mysql_fetch_array($GetAppt)) {
printf("%s-%s-%s <a href=\"updappt.php?id=%s&Mon=%s&Day=%s&Year=%s\">%s</a><br>", $getappt["month"], $getappt["day"], $getappt["year"], $getappt["appt_id"], $getappt["month"], $getappt["day"], $getappt["year"], $getappt["information"]);
}
}
?>