コード例 #1
0
def salestatus(conn, home_id, status):
    return execute(conn, f"UPDATE Sale SET status='{status}' WHERE home_id='{home_id}'")
コード例 #2
0
def lowtohigh(conn):
    return execute(conn, "SELECT * FROM Sale ORDER BY mortgage" )
コード例 #3
0
def hightolow(conn):
    return execute(conn, "SELECT * FROM Sale ORDER BY mortgage DESC" )
コード例 #4
0
def removerent(conn, home_id):
    return execute(conn, f"DELETE FROM Rent WHERE home_id = '{home_id}'")
コード例 #5
0
def forsale(conn):
    return execute(conn, "SELECT * FROM Sale")
コード例 #6
0
def removesale(conn, home_id):
    return execute(conn, f"DELETE FROM Sale WHERE home_id = '{home_id}'")
コード例 #7
0
def forrent(conn):
    return execute(conn, "SELECT * FROM Rent")
コード例 #8
0
def add_homerent(conn, status, rentprice, address, beds, baths, size,
                 agent_id):
    return execute(
        conn,
        f"INSERT INTO Rent(status, rentprice, address, beds, baths, size, agent_id) VALUES ('{status}', '{rentprice}', '{address}', '{beds}', '{baths}', '{size}', '{agent_id}')"
    )
コード例 #9
0
def add_homesale(conn, status, price, address, beds, baths, size, mortgage,
                 agent_id):
    return execute(
        conn,
        f"INSERT INTO Sale(status, price, address, beds, baths, size, mortgage, agent_id) VALUES ('{status}', '{price}', '{address}', '{beds}', '{baths}', '{size}', '{mortgage}', '{agent_id}')"
    )
コード例 #10
0
def rentstatus(conn, home_id, status):
    return execute(conn, f"UPDATE Rent SET status='{status}' WHERE home_id='{home_id}'")