Commit 822c6426108e5025aa167de63f946fb3845bb113

Authored by zhangqijia
1 parent 0db77207

fix: roleByUid 字符串问题

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/utils/MysqlUtil.lua
@@ -77,7 +77,7 @@ function roleUnRegister(roleId) @@ -77,7 +77,7 @@ function roleUnRegister(roleId)
77 end 77 end
78 78
79 function roleByUid(uid) 79 function roleByUid(uid)
80 - local res = mysqlproxy:query(string.format("SELECT id, name, level, FROM `Role` WHERE `del` = 0 and `uid` = %s", uid)) 80 + local res = mysqlproxy:query(string.format("SELECT id, name, level, FROM `Role` WHERE `del` = 0 and `uid` = '%s'", uid))
81 if res["errno"] or not next(res) then 81 if res["errno"] or not next(res) then
82 return false 82 return false
83 end 83 end