change departname to department
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user