Module introduction to the website backend - Classification management (1) Table creation
This section will introduce a very important link, classification management, which is the core of writing a website.
What is classification management? Classification management refers to classifying things into categories, and applying different or similar management methods to different categories.
First we create a cate table to store classification information.
The code is as follows
<?php CREATE TABLE IF NOT EXISTS `cate` ( `cid` int(11) NOT NULL AUTO_INCREMENT, `pid` varchar(32) NOT NULL, `cate_name` varchar(32) NOT NULL, `rank` varchar(32) NOT NULL, PRIMARY KEY (`cid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ; ?>
As shown in the picture:
Insert fields inside:
In this way, a basic classification table is built