Skip to main content
Yao Lu's user avatar
Yao Lu's user avatar
Yao Lu's user avatar
Yao Lu
  • Member for 6 years, 5 months
  • Last seen more than 6 years ago
awarded
comment
cs50 pset7 buy syntax error
sorry i forget, accepted now, thanks so much again
accepted
comment
cs50 pset7 buy syntax error
i changed according to your comment. the insert function in the database works now. thanks so much
awarded
comment
cs50 pset7 buy syntax error
INSERT INTO transaction (company, shares, price, totalprice, id) VALUES ('Apple Inc.', 1, 217.58, 217.58, 4)"]-------this is the correct value i want to insert and i pull it from the error area. if i put in SQL directly, it shows " NSERT INTO transaction (company, shares, price, totalprice, id) VALUES ('Apple Inc.', 1, 217.58, 217.58, 4)"] ERROR: near "transaction": syntax error"
comment
cs50 pset7 buy syntax error
# update tables, transction detail db.execute("INSERT INTO transaction (company, shares, price, totalprice, id) VALUES (:company, :shares, :price, :totalprice, :id)", company = company, shares = shares, price = price, totalprice = totalprice,id = session["user_id"]) i think i did, because i changed the primary of this table called tradedid, and keep the userid still called id, similar as users table, which is not the primary unique key
comment
cs50 pset7 buy syntax error
so i changed the transaction data base and added what you mentioned and i left my code the same as before.However, it still does not work. anything more specific i can do pls? thanks. sorry for taking this long to revisit.
revised
cs50 pset7 buy syntax error
changed transaction database
Loading…
revised
cs50 pset7 buy syntax error
added 5 characters in body
Loading…
revised
cs50 pset7 buy syntax error
added 81 characters in body
Loading…
comment
cs50 pset7 buy syntax error
here is my table, i think it is right
awarded
asked
Loading…
comment
cs50 pset5 hashtable check, misspelled more than expected
It only says looks good.i ll add more comments too. Maybe I will wait a couple days and try it again.
comment
cs50 pset5 hashtable check, misspelled more than expected
thanks again However, i run style50 and it says looked good. but when i submit, the style score is 4 out of 5? any clue on that?
comment
cs50 pset5 hashtable check, misspelled more than expected
oh get it, thanks a lot. you are right, i changed that and passed.
comment
cs50 pset5 hashtable check, misspelled more than expected
i thought strcasecmp does not matter about case anymore? let me add the tolower first anyways. thanks so much
Loading…
comment
speller works after testing but does not pass check50
believe i have the same issue here, however, even after reading above, i am not sure how to fix my code, any more clue pls?