change departname to department

This commit is contained in:
GeorgeYan
2018-04-04 11:06:30 +08:00
parent 412d6fd441
commit 65e50c9dac
7 changed files with 14 additions and 14 deletions

View File

@@ -22,7 +22,7 @@ In the following sections, I'll use the same database table structure for differ
CREATE TABLE `userinfo` (
`uid` INT(10) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(64) NULL DEFAULT NULL,
`departname` VARCHAR(64) NULL DEFAULT NULL,
`department` VARCHAR(64) NULL DEFAULT NULL,
`created` DATE NULL DEFAULT NULL,
PRIMARY KEY (`uid`)
);
@@ -42,7 +42,7 @@ The following example shows how to operate on a database based on the `database/
checkErr(err)
// insert
stmt, err := db.Prepare("INSERT userinfo SET username=?,departname=?,created=?")
stmt, err := db.Prepare("INSERT userinfo SET username=?,department=?,created=?")
checkErr(err)
res, err := stmt.Exec("astaxie", "研发部门", "2012-12-09")