I am trying to do select all of the records in a table where they data
has not expired.
The table contains two fields Subject (varchar(100)) and ExpiryDate
(Date).
I am getting all of the records returned when I execute:
$sql = "select * from tbl where ExpiryDate > " . date("Y-m-d");
mysql_query($sql);
The expiry date in the record I am looking at is 2004-03-25 and the
query that is being executed is:
select * from tbl where ExpiryDate > 2004-03-28
What am I missing? Can anyone recommend a good site to look at that
discusses dates in MySQL queries?
Thanks in advance,
Mark
--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)
Mark Stevens (mark at thepcsite fullstop co fullstop uk)