Hello everyone. I am trying to extract the data from MySQL based on the month, and day of the item, and post them on a page. Something similar to "Today in History" Here is a partial list of my table: CREATE TABLE ANNOUNCEMENT ( AnnouncementID bigint(20) unsigned DEFAULT '0' NOT NULL, Title varchar(250), DateShown date DEFAULT '0000-00-00' NOT NULL KEY AnnouncementID (AnnouncementID), KEY ID (AnnouncementID) ); Can anyone please tell me what I need to do? Here is what I have so far: SELECT AnnouncementID,Title,DateShown FROM ANNOUNCEMENT WHERE DateShown=NOW() ORDER BY DateShown DESC
The problem is that it matches the list to the entire date (including the year), but I only want to look at the month, and the day, when fetching the data. Thanks so much. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php