All,
I have the following code:
$fetch = mysql_query("SELECT * FROM calendar_events where event_status='booked' and event_type='wedding' GROUP BY start");
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
$row_array['id'] = $row['id'];
$row_array['title'] = $row['title'];
$row_array['start'] = $row['start'];
$row_array['end'] = $row['end'];
array_push($return_arr,$row_array);
}
echo json_encode($return_arr);
I’m using the fullcalendar and trying to determine how many events have the same start date. So for example if I had the following dates:
02/06/2012
02/06/2012
03/01/2012
04/05/2012
On dates that have entries in my database I’d like to basically see how many events are on that date and basically say how many spots are left. So for any given date I can have two scheduled events so for 02/06/2012 I’d like it to return “Booked” and for 03/01/2012 I’d like “1 spot left” and etc.
How can I go about doing something like this?
Thanks!
or as by your comment: