\n"; } // end if $sql = "select weekend_id from dances where starts >= '" . $theStart . "' order by starts asc"; //print $sql; $result = mysql_query($sql, $conn); $row = mysql_fetch_assoc($result); $theWkend = $row["weekend_id"]; // get the weekend name $sql = 'select name from weekends where weekend_id = ' . $theWkend; $result = mysql_query($sql, $conn); $row = mysql_fetch_assoc($result); $theWeekendName = $row["name"]; //get the dances $sql = 'select DATE_FORMAT(ends,\'%a - %b %e, %Y\') as "Date"' . ' , concat_ws(\' - \', DATE_FORMAT(starts, \'%l:%i %p\'), DATE_FORMAT(ends, \'%l:%i %p\')) as "Time"' . ' , level as Level' . ' , concat_ws(\' \', m.name_first, m.name_last) as Caller' . ' , concat_ws(\' - \', h.name, h.address, h.city) as Address' . ' , CONCAT(\'Map\') as Map' . ' from dances d join callers c on d.callers_id = c.callers_id' . ' join locations h on d.halls_id = h.halls_id' . ' join levels l on l.levels_id = d.level_id' . ' join members m on m.member_id = c.member_id' . ' WHERE weekend_id = ' . $theWkend . ' order by starts asc' . ' LIMIT 0, 30' . ' '; $result = mysql_query($sql, $conn); $numberofrows = mysql_numrows($result); print "

Based on " . date("m/d/y g:i:s a",$adjDate). " here on the West Coast
"; print "Our " . $theWeekendName . " weekend includes:

"; print "\n"; print "\n"; while ($field = mysql_fetch_field($result)) { print "\n"; } // while end print ""; while ($row = mysql_fetch_assoc($result)) { print "\n"; // look at each field foreach ($row as $col=>$val) { print " \n"; } // end foreach print "\n"; } // end while print "
$field->name
$val
\n"; // print "

"; // $today = getdate(); // print_r($today); // $tc = date_default_timezone_get; // print $tc; // print "

"; ?> Return to Main Page