aftab_jii Posted February 16, 2007 Share Posted February 16, 2007 im working on a blog/online diary and want to sort published articles according to months and year just like on blog pages and i need help with the table and code.. my sql-table for the articles look like: CREATE TABLE `articles` ( `article_id` int(11) NOT NULL auto_increment, `category` varchar(100) NOT NULL default '', `author_id` int(11) NOT NULL default '0', `is_published` tinyint(1) NOT NULL default '0', `date_submitted` datetime NOT NULL default '0000-00-00 00:00:00', `date_published` datetime NOT NULL default '0000-00-00 00:00:00', `title` varchar(255) NOT NULL default '', `body` mediumtext NOT NULL, PRIMARY KEY (`article_id`), KEY `IdxArticle` (`author_id`,`date_submitted`), FULLTEXT KEY `IdxText` (`title`,`body`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=165 ; do i need to create a new table , do changes in the current table or do i have to write new code in PHP for the article.php ? are there any code examples on the net you peope can refer me to? Link to comment https://forums.phpfreaks.com/topic/38749-how-can-i-categorize-articles-into-published-month-and-year/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.