Jump to content

displaying startdate and enddate from a table


thread_PHP

Recommended Posts

HI All

I have a table

like this below

 

CREATE TABLE `newevent` (

`event_id` int(6) unsigned NOT NULL auto_increment,

`eventtitle` varchar(40) default NULL,

`eventtype` varchar(40) default NULL,

`eventdescription` varchar(255) default NULL,

`venuename` varchar(40) default NULL,

`streetaddress1` varchar(100) default NULL,

`streetaddress2` varchar(100) default NULL,

`city` varchar(50) default NULL,

`state` varchar(40) default NULL,

`zipcode` varchar(20) default NULL,

`country` varchar(40) default NULL,

`startdate` varchar(40) default NULL,

`enddate` varchar(40) default NULL,

`starttimehh` varchar(40) default NULL,

`starttimemm` varchar(40) default NULL,

`starttimeam` varchar(40) default NULL,

`endtimehh` varchar(40) default NULL,

`endtimemm` varchar(40) default NULL,

`endtimeam` varchar(40) default NULL,

`total` varchar(20) default NULL,

`males` varchar(40) default NULL,

`females` varchar(40) default NULL,

PRIMARY KEY (`event_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

i want to display the value in startdate,enddate with the event exists

 

for example my event runs from startdate 1-july-2007 till 5-july-2007 i want to display my eventtitle till it ends on 5th of July 2007

 

How can i write this query

 

for example when i write the query to see the

 

select eventtitle,startdate,enddate from newevent is the query that will return the following rows

 

Eventtitle StartDate Enddate

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

'Social Lunch','Wednesday, June 13, 2007','Saturday, June 30, 2007'

 

so in the above query social lunch is occuring from 13th june till 30th july2007

with the above query i am getting displayed start of event and end of the event

 

i want to display all the dates from 13th june 2007 till 30th july 2007 in the output

 

Anybody please help me

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.