Dispaying all dated entries in a DB

    Date: 08/14/05 (PHP Community)    Keywords: mysql, database, sql

    I am trying to display a list of all entries in a blog database. Each entry has a date field, of MySQL type "date", but when I try to display all posts in the database, it only shows posts that have a date on or before the current date. Any post-dated entries do not show up.

    This is the query I am running on the database:

    SELECT * FROM `news` WHERE `date` <= '9999-12-31' ORDER BY `date` DESC, `id` DESC

    I have tried not using a "WHERE" attribute, and also tried "WHERE 1"

    Any suggestions?

    Solved! It was in my post display function. That'll teach me to not pay attention to subfunctions.

    Source: http://www.livejournal.com/community/php/335764.html

« Two Questions || PHP4 OpenID Consumer »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home