def getUserCharacterInfo(characterId): """获取用户角色列表的所需信息 @param id: int 用户的id """ sql = "select town from tb_character where id = %d"%(characterId) result = dbpool.fetchOne(sql, 1) return result
def getUserCharacterInfo(characterId): """获取用户角色列表的所需信息 @param id: int 用户的id """ sql = "select town from tb_character where id = %d" % (characterId) result = dbpool.fetchOne(sql, 1) return result
def getUserInfo(uid): """获取用户角色关系表所有信息 @param id: int 用户的id """ sql = "select * from tb_user_character where id = %d"%(uid) result = dbpool.fetchOne(sql, 1) return result
def getUserInfo(uid): """获取用户角色关系表所有信息 @param id: int 用户的id """ sql = "select * from tb_user_character where id = %d" % (uid) result = dbpool.fetchOne(sql, 1) return result
def checkCharacterName(nickname): """检测角色名是否可用 @param nickname: str 角色的名称 """ sql = "SELECT `id` from tb_character where nickname = '%s'"%nickname result = dbpool.fetchOne(sql) if result: return False return True
def getUserInfoByUsername(username,password): """检测用户名户密码 @param username: str 用户的用户名 @param password: str 用户密码 """ sql = "select * from `tb_register` where username = '******'\ and password = '******'" %( username, password) result = dbpool.fetchOne(sql, 1) return result
def checkCharacterName(nickname): """检测角色名是否可用 @param nickname: str 角色的名称 """ sql = "SELECT `id` from tb_character where nickname = '%s'" % nickname result = dbpool.fetchOne(sql) if result: return False return True
def getUserInfoByUsername(username, password): """检测用户名户密码 @param username: str 用户的用户名 @param password: str 用户密码 """ sql = "select * from `tb_register` where username = '******'\ and password = '******'" % (username, password) result = dbpool.fetchOne(sql, 1) return result
def checkUserPassword(username,password): """检测用户名户密码 @param username: str 用户的用户名 @param password: str 用户密码 """ sql = "select id from `tb_register` where username = '******' and password = '******'" %( username, password) result = dbpool.fetchOne(sql) pid = 0 if result: pid = result[0] return pid
def checkUserPassword(username, password): """检测用户名户密码 @param username: str 用户的用户名 @param password: str 用户密码 """ sql = "select id from `tb_register` where username = '******' and password = '******'" % ( username, password) result = dbpool.fetchOne(sql) pid = 0 if result: pid = result[0] return pid
def CheckUserInfo(Uid): """检测用户信息""" sql = "SELECT * from tb_register where username = '******'"%Uid result = dbpool.fetchOne(sql, 1) return result
def CheckUserInfo(Uid): """检测用户信息""" sql = "SELECT * from tb_register where username = '******'" % Uid result = dbpool.fetchOne(sql, 1) return result