Websen! NT is a set of open-source industry websites launched by wangsheng. developed by net2.0, the functions and columns required by the general industry websites are provided. The following are some analyses related to the industry classification table of the sites, which need to be modified.CodeFor more information, see.
The following table describes the w_industrytype field of the industry classification table.
Id Category Number
Type category name
Whether torelease allows data to be published
Whether superiorsflag is classified as Level 1, 0 indicates level 1, 1 indicates level 2 (there is a category above), and 2 indicates level 2 parent class above
Underlingflag?
Superiorsid parent class ID
The superiors parent class number path, such as 1 and 13, indicates that this class is a Class 3 class with a Class 1 and a class 2 class with a class 13 number.
Use superiorsid = 1 or superiors like '1, % 'to select all subcategories under 1.
In addition, superiors provides convenience for locating parent classes.
Sequence sorting number
==================================
The general information table stores the path of the industry category, for example, supply. indtype = 9,139, indicating that a certain supply information belongs
The category number is 9 under the 139 category name. You can use the following query to obtain all supply information under the 9 category.
Patindex ('%,' + rtrim (9) + ', %', ',' + indtype + ',')> 0
Indicates that as long as the path (indtype) contains [, 9,] (%, 9, %,
Note that "," (comma) is added before and after the indtype field)
Example:
When indtype = 9, patindex ('%, 9, %', ', 9 ,')
When indtype = 9,139, patindex ('%, 9, %', ', 9,139 ,')
-----------------------
Refer:
----------------------------------------
Patindex
Returns the starting position of a mode that appears for the first time in a specified expression. If this mode is not found in all valid text and character data types, zero is returned.
Syntax
Patindex ('% pattern %', expression)