国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

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 //建庫(kù)語(yǔ)句是 create database 數(shù)據(jù)庫(kù)名; //建表語(yǔ)句是: create table 數(shù)據(jù)表名( id INT(4) unsigned NOT NULL AUTO_INCREMENT COMMENT '編號(hào)', name VARCHAR(50) NOT NULL COMMENT '分類(lèi)名', )ENGINE = MyISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1001;"; //僅供參考; ?>
submitReset Code