This section to add some test data to the database.
Log in to MySQL:
Locate the%xampp%\mysql\bin directory,
Open a command window here to log in to MySQL with the root user
User table-built table sql:
CREATE TABLE tm_users (
idInt (one) not NULL auto_increment,
usernamevarchar (255) CHARACTER SET UTF8 DEFAULT NULL,
passwordvarchar (255) DEFAULT NULL,
nicknamevarchar (255) CHARACTER SET UTF8 DEFAULT NULL,
createtimeDateTime DEFAULT NULL,
updatetimeDateTime DEFAULT NULL,
isdeletevarchar (255) DEFAULT NULL,
PRIMARY KEY ( id )
) Engine=innodb auto_increment=14 DEFAULT Charset=utf8;
Copy it in, enter.
This means that the building is ready.
The Department table is the same.
The Department table builds the table sql:
CREATE TABLE tm_dept (
idInt (one) not NULL auto_increment COMMENT ' primary key ',
deptidvarchar (one) DEFAULT NULL COMMENT ' Department number (format bm_001) ',
deptnamevarchar (255) DEFAULT NULL COMMENT ' Department name ',
createtimeDateTime DEFAULT NULL COMMENT ' creation time ',
updatetimeDateTime DEFAULT NULL COMMENT ' Last update Time ',
PRIMARY KEY ( id )
) Engine=innodb auto_increment=6 DEFAULT Charset=utf8;
Test data:
INSERT into tm_dept VALUES (' 6 ', ' bm_001 ', ' Ministry of Science ', ' 2018-04-17 13:50:21 ', ' 2018-04-17 13:50:21 ') ;
INSERT into tm_dept VALUES (' 7 ', ' bm_002 ', ' Finance department ', ' 2018-04-17 13:50:59 ', ' 2018-04-17 13:50:59 ');
INSERT into tm_dept VALUES (' 8 ', ' bm_003 ', ' Cooking department ', ' 2018-04-17 13:51:05 ', ' 2018-04-17 13:51:05 ');
INSERT into tm_dept VALUES (' 9 ', ' bm_004 ', ' Test Department ', ' 2018-04-17 13:51:09 ', ' 2018-04-17 13:51:09 ');
INSERT into tm_dept VALUES (' Ten ', ' bm_005 ', ' development department ', ' 2018-04-17 13:51:14 ', ' 2018-04-17 13:51:14 ');
INSERT into tm_dept VALUES (' One ', ' bm_006 ', ' production department ', ' 2018-04-17 13:51:19 ', ' 2018-04-17 13:51:19 ');
INSERT into tm_users VALUES (' + ', ' zhangsan ', ' 123 ', ' Zhang San ', ' 2018-04-17 13:48:31 ', ' 2018-04-17 13:48:31 ', ' 0 ');
INSERT into tm_users VALUES (' Lisi ', ' 123 ', ' John Doe ', ' 2018-04-17 13:48:52 ', ' 2018-04-17 13:48:52 ', ' 0 ');
INSERT into tm_users VALUES (' + ', ' Wangwu ', ' 123 ', ' Harry ', ' 2018-04-17 13:49:01 ', ' 2018-04-17 13:49:01 ', ' 0 ');
Anyway, just copy it in.
"PHP additions and Deletions Example" section III-MySQL build table