Ejemplo n.º 1
0
def getUserByUsername(username):
    try:
        sql = "select count(1) from user where username='******';" % username
        return dbmysql.first(sql)
    except Exception as e:
        utils.logger.error(e)
        return None
Ejemplo n.º 2
0
def getUserById(id):
    try:
        sql = "select * from user where id=%s;" % id
        return dbmysql.first(sql)
    except Exception as e:
        utils.logger.error(e)
        return None
Ejemplo n.º 3
0
def getUserByUserPass(username, password):
    try:
        sql = "select * from user where username='******' and password='******';" % (username, password)
        return dbmysql.first(sql)
    except Exception as e:
        utils.logger.error(e)
        return None