RE: Finding an ID between two dates

2003-03-14 Thread Roger Davis
Add quotes to you date. SELECT time_period_id FROM time_periods WHERE '2003-03-14' BETWEEN time_period_start AND time_period_end; Worked for me. Roger -Original Message- From: Cory Hicks [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 3:05 PM To: [EMAIL PROTECTED] Subject: Findin

Re: Finding an ID between two dates

2003-03-14 Thread Stefan Hinz
Cory, > time_period_id int(11) NOT NULL auto_increment, > time_period_start date NOT NULL default '-00-00', > time_period_end date NOT NULL default '-00-00', > PRIMARY KEY (time_period_id) > I am trying to get the ID that relates to a date falling between the > range of time_period_start

Re: Finding an ID between two dates

2003-03-14 Thread Ignatius Reilly
Quotes missing around dates. WHERE "2003-03-14" ... Ignatius - Original Message - From: "Cory Hicks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 14, 2003 9:05 PM Subject: Finding an ID between two dates > Hey folks! > > I a