How to get entries and display it in a calendar
I have two tables called hotel & rates and structure is as below;
===============================================
DROP TABLE IF EXISTS hotels;
CREATE TABLE IF NOT EXISTS hotels (
id int(5) NOT NULL auto_increment,
hotel varchar(255) NOT NULL,
logo varchar(255) default NULL,
star int(5) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY hotel (hotel)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS rates;
CREATE TABLE IF NOT EXISTS rates (
id int(5) NOT NULL auto_increment,
hotel int(5) NOT NULL,
startdate date,
startdate date,
rate varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
What I want to do is run a query like "SELECT * FROM rates WHERE hotels.id = rates.hotel BETWEEN startdate , enddate" and display the result on a monthly format calendar.
Can anyone kindly help me to write the php code for me.
Thank you in advance.