Questions tagged [insert]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

issue with my "Buy" code in finance problem set

There is a syntax error when I try to insert the buy information into my trade table. Here is my code. The issue is at the long db.execute line. Any guidance would be great. Thanks. def buy(): &...
user avatar
0 votes
1 answer
220 views

CS50 finance SELL - Cannot get the code to subtract the stock from the database or index

I have tried a number of versions of this code, except I cannot get it to subtract shares from my ("/") index page it does nothing and shows nothing in the shares column in the transaction ...
user avatar
0 votes
1 answer
62 views

PSET 5 My hash table doesn't seem to be storing correctly

When I load the dictionary, I add the words to the hash table, by calling the hash function to calculate the bucket ID, then add hash function to actually insert it into the list. Inside the addhash ...
user avatar
0 votes
1 answer
212 views

Finance pset, register will not insert user data

I've completed register page html, and it works as expected. However, it won't insert the data from the user into the database. There are no errors. I can't seem to find how to debug python/flask ...
user avatar
0 votes
1 answer
60 views

Finance register function does not insert data in database

I am trying to finish the register function but something goes wrong. I get an error message " It seems that although registration is claimed to be ok (from check50) nothing is actually added in the ...
user avatar
0 votes
0 answers
22 views

Finance pset, application.py, app.route("/buy"), Insert statement gives a runtime error [duplicate]

I don't know what's wrong with this Insert statement. Insert the transaction process into the transaction table. rows = db.execute("INSERT INTO transaction(cust_id, share_symbol, share_name, ...
user avatar
0 votes
1 answer
361 views

Finance PSET8: Error: execute() takes 2 positional arguments but 3 were given

While implementing "Register" part in PSET8, I ran into the following problem - the code below returns: "TypeError: execute() takes 2 positional arguments but 3 were given". username = request.form....
user avatar
0 votes
1 answer
14 views

Update on duplicate portflolio help

I understand how to make portfolio now, but I highly suspect (and by that I mean I know) that my SQL statement is very off. I'm not exactly sure where the "" need to go, or how to add the new amount ...
user avatar