Exemple #1
0
def query_delete(id):
    if request.method == "GET":
        query = db.get_query_details(id)
        return render_template("delete_query.html", query=query)
    elif request.method == "POST":
        db.delete_query(id)
        flash("Delete Successful", "success")
        return redirect(url_for("index"))
Exemple #2
0
def q6_1():
    try:
        query = "DELETE FROM `EMPLOYEE` WHERE SSN=%s"

        data = ('444444400')
        print(db.delete_query(query, data))
        logging.info(str(query) + " " + str(data))

    except Exception as e:
        traceback.print_exc()
        logging.error('Error in DELETE_DATA: %s', e)
Exemple #3
0
def q4_9():
    try:
        query = "DELETE FROM DEPARTMENT WHERE Dnumber=%s"

        data = (9)
        print(db.delete_query(query, data))
        logging.info(str(query) + " " + str(data))

    except Exception as e:
        traceback.print_exc()
        logging.error('Error in DELETE_DATA: %s', e)
Exemple #4
0
def q4_10():
    try:
        query = "DELETE FROM DEPENDENT WHERE Essn=%s"

        data = ('666666608')
        print(db.delete_query(query, data))
        logging.info(str(query) + " " + str(data))

    except Exception as e:
        traceback.print_exc()
        logging.error('Error in DELETE_DATA: %s', e)
Exemple #5
0
def deleteTodos(todo_id):
    delete_query(todo_id)
    results = select_query()
    return make_response(results), 201