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 Link to comment https://forums.phpfreaks.com/topic/151028-admin-cats-and-subcats/ 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" Link to comment https://forums.phpfreaks.com/topic/151028-admin-cats-and-subcats/#findComment-793443 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. Link to comment https://forums.phpfreaks.com/topic/151028-admin-cats-and-subcats/#findComment-793451 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.