From 822c6426108e5025aa167de63f946fb3845bb113 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Fri, 3 Dec 2021 19:22:19 +0800 Subject: [PATCH] fix: roleByUid 字符串问题 --- src/utils/MysqlUtil.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/MysqlUtil.lua b/src/utils/MysqlUtil.lua index d3182aa..6f98e8d 100644 --- a/src/utils/MysqlUtil.lua +++ b/src/utils/MysqlUtil.lua @@ -77,7 +77,7 @@ function roleUnRegister(roleId) end function roleByUid(uid) - local res = mysqlproxy:query(string.format("SELECT id, name, level, FROM `Role` WHERE `del` = 0 and `uid` = %s", uid)) + local res = mysqlproxy:query(string.format("SELECT id, name, level, FROM `Role` WHERE `del` = 0 and `uid` = '%s'", uid)) if res["errno"] or not next(res) then return false end -- libgit2 0.21.2