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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.