def get_latest_foodprefs(customer_id):
    conn = sqlite3.connect('ORDERM8.db')
    c = conn.cursor()
    customer_id_tuple = (customer_id,)
    c.execute('SELECT * FROM customerprefs WHERE customer_id=(?) AND field_id = 20 ORDER BY id DESC LIMIT 1', customer_id_tuple)
    for item in c:
        return item
def get_latest_foodprefs(customer_id):
    conn = sqlite3.connect('ORDERM8.db')
    c = conn.cursor()
    customer_id_tuple = (customer_id,)
    c.execute('SELECT * FROM customerprefs WHERE customer_id=(?) AND field_id = 20 ORDER BY id DESC LIMIT 1', customer_id_tuple)
    for item in c:
        return item