Beispiel #1
0
def del_session(sessionid):
    base_db.execute("DELETE FROM sessions WHERE session_id = %s", sessionid)
Beispiel #2
0
def mark_messages_as_read(user_id, recipient_id):
    query = "UPDATE users_message  SET flag_reading = True WHERE recipient_id=%s AND user_id=%s "
    base_db.execute(query, user_id, recipient_id)
Beispiel #3
0
def create_session_data(session_id, data):
    data = json.dumps(data)
    query = "INSERT INTO sessions(session_id, data) VALUES (%s, %s);"
    base_db.execute(query, session_id, data)