Re: [PHP-DB] simple sql question

2001-03-27 Thread Doug Semig

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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] simple sql question

2001-03-27 Thread Ted Rolle

Is DATE CCYY-MM-DD?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]