"""Order lookups."""


def find_order(cur, order_id):
    cur.execute(
        "SELECT id, total, status FROM orders WHERE id = %s",
        (order_id,),
    )
    return cur.fetchone()


def orders_for(cur, customer):
    cur.execute("SELECT id FROM orders WHERE customer = %s ORDER BY id", (customer,))
    return cur.fetchall()
