本文介绍了递归和中断类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有以下类别的列表:

If i have a list of categories like:

1. Billboards and advertisement section
  1(a)City Clock
    1(a)(i)Application fee  (has columns for approved price and proposed price)
    1(a)(ii)Advertisement Per year (has columns for approved price and proposed price)

  1(b)Billboards
    1(b)(i)Application fee for construction (has columns for approved price and proposed price)
    1(b)(ii)Charge per year without advertisement (has columns for approved price and proposed price)

  1(c)Something here.....
    1(c)(i) something here...(has columns for approved price and proposed price)
    1(c)(ii)something here...(has columns for approved price and proposed price)
    1(c)(iii) something here... (has columns for approved price and proposed price)
     e.t.c

THEN SOME CATEGORIES LOOK LIKE:category 2
2. Category name
  2(a)something here..(has columns for approved price and proposed price)
  2(b)something here..
    2(b)(i)something here..(has columns for approved price and proposed price)
    2(b)(ii)something here..(has columns for approved price and proposed price)


现在:我有没有子类别的类别,其他有子类别的类别,主类别没有价格列(或只说其他列),没有子类别的子类别将有价格列,如果子类别具有子类别,则其子类别应具有价格列(这是我的问题所在-我如何在vb.net中处理这种情况?)


NOW: i have categories without sub categories and others with sub-sub categories , a main category doesn''t does have a column for prices ( or lets just say other columns) , a sub category WITHOUT its sub category will have columns for prices, if a sub category has its sub category, then its subcategory should have columns for prices (this is where my problem is - how do i handle such a situation in vb.net?? )

推荐答案


CREATE TABLE IF NOT EXISTS `price_category` (
  `act_code` int(20) NOT NULL,
  `name` text NOT NULL,
  PRIMARY KEY  (`act_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `price_sub_category`
--

CREATE TABLE IF NOT EXISTS `price_sub_category` (
  `id` int(11) NOT NULL auto_increment,
  `act_code` int(20) NOT NULL,
  `name` text NOT NULL,
  `aprovedp1` int(20) default NULL,
  `aprovedp1y` char(20) default NULL,
  `aprovedp2` int(20) default NULL,
  `aprovedp2y` char(20) default NULL,
  `proposedp` int(20) default NULL,
  `proposedpy` char(20) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `price_sub_sub_category`
--

CREATE TABLE IF NOT EXISTS `price_sub_sub_category` (
  `id` int(11) NOT NULL auto_increment,
  `act_code` int(20) NOT NULL,
  `sub_code` int(20) NOT NULL,
  `name` text NOT NULL,
  `aprovedp1` int(20) default NULL,
  `aprovedp1y` char(20) default NULL,
  `aprovedp2` int(20) default NULL,
  `aprovedp2y` char(20) default NULL,
  `proposedp` int(20) default NULL,
  `proposedpy` char(20) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


这篇关于递归和中断类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 17:36