def destroy_all_sample(): project_number = session.get('project_number') if session.get( 'project_number') else '' table_name = request.args.get('table') db = DBConn() ans = db.delete(table_name, condition_dict={'project_id': project_number}) if ans: return jsonify({'success': 'true', 'errMsg': 'error'}) else: return jsonify({'success': 'false', 'errMsg': 'del fail!'})
def del_select_data(): sample_name = request.args.get('id') sample_time = request.args.get('time') table_name = request.args.get('table') db = DBConn() ans = db.delete(table_name, condition_dict={'sample_name': sample_name}) if ans: return jsonify({'success': 'true', 'errMsg': 'error'}) else: return jsonify({'success': 'false', 'errMsg': 'del fail!'})