Esempio n. 1
0
def getlist():
    cur = DictCursor(mysql.get_db())
    cur.execute("SELECT * FROM attend;")
    return jsonify(cur.fetchall())
Esempio n. 2
0
 def record_callback_fetch_all(cursor: DictCursor):
     return cursor.fetchall()
Esempio n. 3
0
def getpayment():
    cur = DictCursor(mysql.get_db())
    cur.execute(
        "SELECT id,stu_name,stu_unit,price FROM attend WHERE paid=0 AND attendance=1;"
    )
    return dumps(cur.fetchall(), ensure_ascii=False)