JSON/PHP Dynamic Feed to fill calendar events

The attached zip file is the javascript calendar I am implementing into a page in my site.

It needs to use the json method as described at: [url removed, login to view]

The calendar javascript on the main PHP page ([url removed, login to view]) needs to be:

<script type='text/javascript'>

$(document).ready(function() {


header: {

left: 'prev,next today',

center: 'title',

right: 'month,agendaWeek,agendaDay'


editable: false,

events: "[url removed, login to view]",

eventDrop: function(event, delta) {

alert([url removed, login to view] + ' was moved ' + delta + ' days\n' +

'(should probably update your database)');


loading: function(bool) {

if (bool) $('#loading').show();

else $('#loading').hide();





javascript call function for the html is:


<div id='loading' style='display:none'>loading...</div>

<div id='calendar'></div>


The text that I have so far is: ([url removed, login to view])


$con = mysql_connect('localhost', 'root', 'pass');

if (!$con)


die('Could not connect: ' . mysql_error());


mysql_select_db("database", $con);

$sql="SELECT * FROM approviderbooked WHERE comp_id = 'zstone'";

$result = mysql_query($sql);

do {

$classname = $row['class_name'];

$time = $row['b_from'];

sscanf($time, "%d :%d", $hour, $min );//start time

$timee = $row['b_to'];

sscanf($timee, "%d :%d ", $houre, $mine );//end time

$bookday = $row['book_day'];

sscanf($bookday, "%d/%d/%d", $month, $day, $year );//start date

$bookdaye = $row['book_day'];

sscanf($bookdaye, "%d/%d/%d", $month, $day, $yeare );//end date

echo json_encode(array(


'title' => $classname,

'start' => "$year-$month-$day $hour:$min:00Z",

'end' => "$year-$month-$day $houre:$mine:00Z",

'allDay' => false



} while ($row = mysql_fetch_assoc($result));



create table data for sql>>>>

-- --------------------------------------------------------


-- Table structure for table `approviderbooked`


CREATE TABLE `approviderbooked` (

`b_hour_id` int(10) NOT NULL auto_increment,

`comp_id` varchar(25) NOT NULL,

`j_id` int(10) NOT NULL,

`class_name` varchar(25) NOT NULL,

`s_id` int(10) NOT NULL,

`book_day` varchar(10) NOT NULL,

`p_job_duration` decimal(3,2) NOT NULL,

`b_from` time NOT NULL,

`b_to` time NOT NULL,

`b_class_count` varchar(3) NOT NULL,

`b_class_avail` varchar(1) NOT NULL default '1',

`p_id` int(10) NOT NULL,

PRIMARY KEY (`b_hour_id`)



-- Dumping data for table `approviderbooked`


INSERT INTO `approviderbooked` VALUES (10000, 'zstone', 1, 'Hatha Yoga', 1, '11/11/2011', 1.00, '16:30:00', '17:30:00', '1', '1', 10);

INSERT INTO `approviderbooked` VALUES (10001, 'zstone', 1, 'Ashtonga Yoga', 1, '11/11/2011', 0.50, '16:00:00', '16:30:00', '10', '1', 16);

INSERT INTO `approviderbooked` VALUES (10002, 'zstone', 2, 'Tai Chi', 2, '11/12/2011', 1.00, '17:00:00', '18:00:00', '3', '1', 10);


current json output is

[{"title":null,"start":"-- ::00Z","end":"-- ::00Z","allDay":false}][{"title":"Hatha Yoga","start":"2011-11-11 16:30:00Z","end":"2011-11-11 17:30:00Z","allDay":false}][{"title":"Ashtonga Yoga","start":"2011-11-11 16:0:00Z","end":"2011-11-11 16:30:00Z","allDay":false}][{"title":"Tai Chi","start":"2011-11-12 17:0:00Z","end":"2011-11-12 18:0:00Z","allDay":false}]

output needs to be (notice the times $min that are 00 changed to 0 in the above - also ][ is , between outer []

[{"title":null,"start":"-- ::00Z","end":"-- ::00Z","allDay":false},{"title":"Hatha Yoga","start":"2011-11-11 16:30:00Z","end":"2011-11-11 17:30:00Z","allDay":false},{"title":"Ashtonga Yoga","start":"2011-11-11 16:00:00Z","end":"2011-11-11 16:30:00Z","allDay":false},{"title":"Tai Chi","start":"2011-11-12 17:00:00Z","end":"2011-11-12 18:00:00Z","allDay":false}]

or another option using the json / feed method

Skills: AJAX, Javascript, PHP

See more: dynamic event calendar php, fill data database calendar event php, php fill calendar, json calendar events, php json calendar, dynamic json calendar, javascript calendar event, json mysql_fetch_assoc php, fill event calendar javascript, javascript fill calendar, json feed calendar, dynamic calendar event php, json calendar, json feed html, calendar dynamic php, dynamic php calendar, dynamic events calendar php, json event calendar, dynamic event calendar javascript, php event calendar, table data structure, php script null, php create table, loading function in php, key data structure

About the Employer:
( 12 reviews ) Carlsbad, United States

Project ID: #1289331

Awarded to:


can do this.

$50 USD in 1 day
(6 Reviews)

5 freelancers are bidding on average $62 for this job


We can help in your project, please check PMB and our ratings/reviews to get idea of our experience.

$100 USD in 3 days
(223 Reviews)

Hi , I am experienced Programmer for 5 years .I am proficient in upgrade and revise existing php code with many project exp .Look forward to your reply . m Regards Gary

$50 USD in 10 days
(37 Reviews)

Ready to start. Let me do this right now

$60 USD in 3 days
(9 Reviews)

please check your PMB

$50 USD in 1 day
(1 Review)