This commit is contained in:
shoopea 2019-05-10 22:03:19 +08:00
parent 8b63617cfc
commit 514ff9b9b1

11
sql.go
View File

@ -1325,8 +1325,15 @@ func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error {
}
func createJob(job_type_id int32, priority int32, schedule time.Time, payload []byte) error {
res, err := db.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(int(objTypeJob)) + `,` + strconv.Itoa(job_type_id) + `);`)
stmt, err := db.Prepare(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (? , ?);`)
logOnError(err, "createJob : prepare insert obj")
if err != nil {
return err
}
defer stmt.Close()
res, err = stmt.Exec(objTypeJob, job_type_id)
logOnError(err, "createJob : insert obj")
if err != nil {
return err