This commit is contained in:
shoopea 2019-05-06 11:13:11 +08:00
parent e63c05ca0b
commit 00209a69ad

2
sql.go
View File

@ -165,7 +165,7 @@ func putUnprocessedMsg(m ChatWarsMessage) (int64, error) {
func getMsg(objId int64) (ChatWarsMessage, error) {
var m ChatWarsMessage
stmt, err := db.Prepare(`SELECT om.msg_id, om.chat_id, om.sender_user_id, UNIX_TIMESTAMP(om.date), om.text FROM obj_msg om WHERE om.id = ?`)
stmt, err := db.Prepare(`SELECT om.msg_id, om.chat_id, om.sender_user_id, UNIX_TIMESTAMP(om.date), om.text FROM obj_msg om WHERE om.obj_id = ?`)
if err != nil {
return m, err
}