I am very new to this and would like to create a database that will put events in
a php calendar. The two main fields that I need will contain event and the date.
I believe that event_date is the date field, not sure what the SELECT title and the FROM events. Are both fields, or one of them table name????
Any help will be greatly appreciated.
$events = array();
$query = "SELECT title, DATE_FORMAT(event_date,'%Y-%m-%D') AS event_date FROM events WHERE event_date LIKE '$year-$month%'";
$result = mysql_query($query,$db_link) or die('cannot get results!');
while($row = mysql_fetch_assoc($result)) {
$events[$row['event_date']][] = $row;
}