stewartrose Posted March 25, 2009 Share Posted March 25, 2009 Hi Team, after days of searching for information I have given up, I am trying to build a admin cp for news articles, yup i could go and buy one, but I thought it more interesting to try and build one YES with help Here is what I have CREATE TABLE `lx_category` ( `id` bigint(10) NOT NULL auto_increment, `category` varchar(150) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ; CREATE TABLE `lx_subcategory` ( `id` bigint(10) NOT NULL auto_increment, `categoryid` varchar(150) NOT NULL default '', `sub_category` varchar(150) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; What I would like to do is add/modify/delete main cats and sub cats Could any one help please to get me on my way All the best from Alan Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted March 25, 2009 Share Posted March 25, 2009 I suggest you put your categories and subcategories in one table. You can use a parent id for the subcategories. also you might wanna change the id type from "varchar" to "int" Quote Link to comment Share on other sites More sharing options...
Yesideez Posted March 25, 2009 Share Posted March 25, 2009 I'd also suggest changing the ID fields from BIGINT to MEDIUMINT UNSIGNED. 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.