def getMcode(mobile): if type(mobile) == str and len(mobile) == 11: str1 = mobile[-2:] str2 = mobile[-3] sql = "select Fverify_code from sms_db_" + str1 + ".t_mvcode_info_" + str2 + \ " where Fmobile_no=" + mobile + " GROUP BY Fsend_time DESC" print(sql) A = MysqlUtil() res = str(A.fetchone(sql)) A.close_database() else: res = None return res
def getuid(user_id): sql = "select Fuid FROM user_db.t_user_info where Fuser_id = '" + user_id + "'" A = MysqlUtil() res = str(A.fetchone(sql)) A.close_database() return res