Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with php data #9

Open
sagarneo11 opened this issue May 19, 2011 · 0 comments
Open

Problem with php data #9

sagarneo11 opened this issue May 19, 2011 · 0 comments

Comments

@sagarneo11
Copy link

Hi,

I m using php to connect full calender to mysql... but when it is rendering all events no "view more" link appears but when i click on next month and then click on today view more link appears but it disturb all size of fullcalender... i dont know exactly what wrong i m doing will you please help me?

following is my code which i m using...

$(document).ready(function(){

    $('#calendar').fullCalendar({
      editable: true,
      header: {
        left: "prev,next today",
        center: "title",
        right: "month,agendaWeek,agendaDay",
        defaultView: 'month'
      },
      events:
            <?php
            //$myID = $_SESSION['MM_Username'];
            //pending status  
            echo "[";
                 $query_EventStr = "SELECT id, username, shopname, sched_city, sched_status, sched_date FROM scheduler";
                    mysql_select_db($database_localhost, $localhost);
                   $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['username'].", ".$row_EventStr['shopname']."', ";
                       $events .= "start:'".$row_EventStr['sched_date']."',";
                       $events .= "allDay: false,";
                       $events .= "textColor: '#fff',";
                       //$events .= "url:'".$row_EventStr['url']."',";
                       $date_fix=date("F j, Y, g:i",strtotime($row_EventStr['sched_date']));
                       $events.= "},";
                       } while ($row_EventStr = mysql_fetch_assoc($EventStr)); 

                       mysql_free_result($EventStr);
                            $EventStr = null;
                            $events = trim($events, ",");
                            //echo json_encode($events);
                            echo $events;
                            echo "],";
                                    ?>      


    });

    $('#calendar').limitEvents(4);

    //$('#calendar').limitEvents({
    //  maxEvents: 3,
    //  viewMoreClick: function(){
    //    alert('custom click handler fired');
    //  }
    //});

  });
</script>

Please HELP ME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant