Phpmyadmin
Tip: create a database named biezhiyinan. Create a data table named Article in this database. Next we will enter a key point, that is, to create each field under the table Article.
First, create a database named webjxcom. Create a data table named Article in this database. Next we will enter a key point, that is, to create each field under the table Article.
So what is a field? It is a general term for a type of things. For example, all the news are represented by one term. We use "time" for representation. We set the title field to "title ". In fact, we can make each title or time content correspond to a number, that is, the field ――
"Id": the field "id" is a default preferred field. content in other fields can be repeated, but this field is an Arabic number that increases from 1. When setting this field, you must set the primary key, index, unique, and auto-increment. This auto-increment is automatically added. When content is added to any field, this field is automatically increased by 1, that is, any field corresponds to a unique id, such as 1, 2, 7 ......
Next we will talk about the establishment of some fields in news.
1. id: indicates the number of each news item. it is unique and the type is tingint. the length of the tingint type is not required. The system defaults to 4. in the "extra" field, select auto-increment, and select the primary key.
2. author: it indicates the author (News publisher). set the type to varchar. when setting the length of this field, if the authors are all Chinese, the maximum length of 8 bytes is (4 Chinese characters ), however, given that the author may be a foreigner and the number of 8 bytes is obviously too small, the same problem exists for other fields. here we will set the length to 8.
3. title: indicates the news title. the type is varchar and the length is 60.
4. content: indicates the news content. the type is text. You do not need to set the length for this type.
5. from: indicates the news source. the type is varchar and the length is 60.
6. addtime: indicates the publication time. The data type is datetime. you do not need to set the length.
7. hits: indicates that the CTR type is varchar and the length is 60.
The following describes the field types:
1. date: time and date type. The time and date types also include: