def METHOD_NAME():
    app.logger.info("Processing {0} with request.form {1}".format(str(request.method), str(request.form))) 
    try:
        conn = mysql.connect()
        cursor = conn.cursor(pymysql.cursors.DictCursor)
        if request.method == 'POST':
            field = request.form['field'] 
            value = request.form['value']
            editid = request.form['id']
            app.logger.info("Processing POST for field '{0}', editid '{1}' and value '{2}'".format(field, value, editid)) 
            if field == 'comment' and value != '':
                sql = "UPDATE items SET comments=%s WHERE guid=%s"
                data = (value, editid)
                conn = mysql.connect()
                cursor = conn.cursor()
                app.logger.info ("Sending SQL query '{0}' with data '{1}'".format(sql, str(data)))
                cursor.execute(sql, data)
                conn.commit()
            elif field == 'status' and value != '':
                sql = "UPDATE items SET status=%s WHERE guid=%s"
                data = (value, editid)
                conn = mysql.connect()
                cursor = conn.cursor()
                app.logger.info ("Sending SQL query '{0}' with data '{1}'".format(sql, str(data)))
                cursor.execute(sql, data)
                conn.commit()
            else:
                app.logger.info ("Field is '{0}', value is '{1}': not doing anything".format(field, value))
        success = 1
        return jsonify(success)
    except Exception as e:
        app.logger.info("Oh oh, there is an error: {0}".format(str(e)))
        success = 0
        return jsonify(success)
    finally:
        cursor.close() 
        conn.close()