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!
Then we insert some data into the database:
At this point our news classification data table is created!
Next Section