亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Creation of news classification table for PHP native development news station

In our previous courses, we have completed the addition, deletion, modification and checking of news, as well as the paging function. In the previous news modifications and additions, we all mentioned news classification, so in this section we At the beginning of the class, I will introduce news classification to you!

First we open the phpmyadmin graphical management tool, find the project database, and create a data table. Our news category is named: new_category. What we do is the simplest classification, which is the first-level classification, so we only Two fields are required, one id and one name!

1744.png

Then we insert some data into the database:

1745.png

At this point our news classification data table is created!

Continuing Learning
||
<?php //建庫語句是 create database 數(shù)據(jù)庫名; //建表語句是: create table 數(shù)據(jù)表名( id INT(4) unsigned NOT NULL AUTO_INCREMENT COMMENT '編號', name VARCHAR(50) NOT NULL COMMENT '分類名', )ENGINE = MyISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1001;"; //僅供參考; ?>
submitReset Code