Click to See Complete Forum and Search --> : Select Where Date


Durbs
08-10-2005, 12:04 PM
I'm having trouble perfoming a select. I want to select a number of rows that all have the same date. I know the date (i.e. 2003-11-08) but when setting WHERE date = 2003-11-08 i don't get any results...

Cheers, Durbs

schizo
08-10-2005, 01:32 PM
What's the column data type?

NogDog
08-10-2005, 01:41 PM
Make sure you quote the date value:

WHERE `date_column` = '2003-11-08'

Otherwise you'd be comparing date_column to 2003 minus 11 minus 08, i.e. "1984".

Durbs
08-10-2005, 03:30 PM
That'll be why then....cheers again Nog Dog