提交 1f50907c 编写于 作者: martianzhang's avatar martianzhang

fix #252 change database with backtick

上级 d07578ea
......@@ -90,7 +90,7 @@ func (db *Connector) Query(sql string, params ...interface{}) (QueryResult, erro
}
common.Log.Debug("Execute SQL with DSN(%s/%s) : %s", db.Addr, db.Database, fmt.Sprintf(sql, params...))
_, err = db.Conn.Exec("USE " + db.Database)
_, err = db.Conn.Exec("USE `" + db.Database + "`")
if err != nil {
common.Log.Error(err.Error())
return res, err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册