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"))
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)
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)
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)
def deleteTodos(todo_id): delete_query(todo_id) results = select_query() return make_response(results), 201