Expired articles appear after expiration date
am 12.06.2006 21:09:41 von phillip.s.powellI have a table, "article" that has a datetime field "article_expires".
In my SQL statement I have this:
[Code]
SELECT id, title, body
FROM article
WHERE (article_expires IS NOT NULL OR article_expires = '' OR
article_expires LIKE '0000-00-00%' OR article_expires < now())
ORDER BY ranking DESC, record_entered DESC, upper(title) ASC,
upper(body) ASC
[/Code]
Here is info in the table for one row with an expiration date:
[Quote]
----+------------------------------------------------------- -------------------+---------------------+
| id | title
| article_expires |
+----+------------------------------------------------------ --------------------+---------------------+
| 1 | This article should never appear | 2006-06-12
14:55:36 |
[/Quote]
Yet in my resultset this article appears even as of 3:04pm! What am I
possibly doing wrong for this to happen and how can I fix this? The
goal is to only show unexpired articles AND/OR articles that have no
expiration date.
Thanx
Phil