| Issue 394: | MYSQL current displayed event info ONLY | |
| 1 person starred this issue and may be notified of changes. | Back to list |
would like to see a way to use the next and prev months links to display the as needed info from mysql so the event list is not for the complete mysql database of info. thus using ONLY the CURRENT displayed info. if you would like farther explanation please ask
Mar 15, 2010
Project Member
#1
adamrs...@gmail.com
Status:
Done
May 30, 2010
i got this to work in a round about way
heres how im doing it
events: [
<?php
$today = date("c");
$query_EventStr = "SELECT UNIX_TIMESTAMP(event_start) as
newdate,id,event_title,event_body,url,event_start,event_stop FROM events2";
//$query_EventStr = "SELECT * FROM events2 where event_start
>= '$today' order by event_start asc LIMIT 0, 1";
$EventStr = mysql_query($query_EventStr) or
die(mysql_error());
$row_EventStr = mysql_fetch_assoc($EventStr);
$events = "";
do {
$events .= "{";
$events .= "id:'".$row_EventStr['id']."',";
$events .=
"title:'".$row_EventStr['event_title']."',";
$events .= "start:'".$row_EventStr['event_start']."',
";
$events .= "end:'".$row_EventStr['event_stop']."', ";
$events .= "allDay: false,";
//$events .= "url:'".$row_EventStr['url']."',";
$date_fix=date("F j, Y, g:i
a",strtotime($row_EventStr['event_start']));
$events .= "tooltip:'<FONT
COLOR=#000><strong>".$row_EventStr['event_title']."<\/strong><\/font><br/><FONT
SIZE=-2 COLOR=#008000>Date: ".$date_fix."<\/FONT><hr style=\"width:100%;text-
align:left;margin-
left:0\">".str_replace("\r\n","<br>",$row_EventStr['event_body'])."'";
$events.= "},";
} while ($row_EventStr = mysql_fetch_assoc($EventStr));
mysql_free_result($EventStr);
$EventStr = null;
$events = trim($events, ",");
//echo json_encode($events);
echo $events;
?>
],
is there aw ay to do just this months info and then have prev and next months buttons
load there info?
$query_EventStr = "SELECT UNIX_TIMESTAMP(event_start) as
newdate,id,event_title,event_body,url,event_start,event_stop FROM events2 **WHERE
MONTH IS CURRENT MONTH**";
**WHERE MONTH IS CURRENT MONTH** ???
so its not loading ALL the data from mysql database at one time??
|
|
| ► Sign in to add a comment |