mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 14:51:00 +01:00
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>
This commit is contained in:
parent
c2748ea7fe
commit
9b2fcadeef
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ func DeleteUserOpenID(openid *UserOpenID) (err error) {
|
|||
|
||||
// ToggleUserOpenIDVisibility toggles visibility of an openid address of given user.
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue