嘿,我使用以下代码:
bookseats = [0,1]
print"What seats would you like to book?"
bookseats[0] = raw_input("Choice : ")
bookseats[1] = raw_input("What is their user ID? : ")
cur.execute("SELECT * FROM seats WHERE Booked='N'")
row = cur.fetchone()
if row != None and row[2] == "S":
booked = 'B'
print "Seat Number:" , row[0] ,"Is now booked!"
cur.execute("UPDATE seats SET CustID=? AND Booked=? WHERE Seat_name=? AND Day=?", (bookseats[1],booked,bookseats[0],choice)
但是当我这样做时,CustID 列也只是更改为 0,而 Booked 列没有切换到“B”表示预订,它只是停留在“N”上,请帮帮我!:(