瀏覽代碼

Fix SQL quoting (#5117)

`show` is keyword in MySQL and has to be quoted to reference a column name. Use grave accents (ASCII code 96) for quoting to match rest of the source code. It's non-standard SQL, but it's supported by SQLite and MySQL.

Signed-off-by: Filip Navara <navara@emclient.com>
tags/v1.7.0-dev
Filip Navara 5 年之前
父節點
當前提交
9b2fcadeef
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      models/user_openid.go

+ 1
- 1
models/user_openid.go 查看文件



// ToggleUserOpenIDVisibility toggles visibility of an openid address of given user. // ToggleUserOpenIDVisibility toggles visibility of an openid address of given user.
func ToggleUserOpenIDVisibility(id int64) (err error) { func ToggleUserOpenIDVisibility(id int64) (err error) {
_, err = x.Exec("update user_open_id set show = not show where id = ?", id)
_, err = x.Exec("update `user_open_id` set `show` = not `show` where `id` = ?", id)
return err return err
} }



Loading…
取消
儲存