Re: simple sql question

From: Date: Wed, 28 Mar 2001 01:05:45 +0000
Subject: Re: simple sql question
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7917@lists.php.net to get a copy of this message
There is no date that was before Jan 4th and on or after March 1st simultaneously--not even March 27th. Today might be a special day to individuals for varying reasons (birthdays, anniversaries, new jobs, promotions, whatever) but it's not THAT special that it simultaneously exists in two mutually exclusive sets of dates. http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DAT ETIME How about "...WHERE startDate >= '2001-03-01' AND startDate < '2001-04-01'" to pull out all of the March events? Doug At 06:49 PM 3/27/01 -0600, Paulson, Joseph V. \"Jay\" wrote: >Hello- >I'm running MySQL and php and when I run the query below I don't get any >return rows. As you can see I search for events that are happening between >a certain date. The "startDate" field is type DATE in MySQL and the date in >the database that should be returned in "2001-03-27" but I'm not getting any >results. > >select * from events where startDate>='2001-03-01' and >startDate<'2001-01-04' > >Any help on what I could be doing wrong would be great! > >Thanks, >Jay Paulson >Developer, Web Technologies >Viatel, Inc. >http://www.viatel.com

« previous php.db (#7917) next »