As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [insert]

The tag has no usage guidance.

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

cs50p camelcase

I am writing a for loop to iterate through a string, whenever the loop detects an uppercase character it will insert an underscore. My question are as follows: I am able to insert the underscore into ...
daostersibo's user avatar
0 votes
0 answers
85 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(): &...
JerryCinc's user avatar
0 votes
1 answer
335 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 ...
Christopher White's user avatar
0 votes
1 answer
74 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 ...
Jamie Walker's user avatar
0 votes
1 answer
253 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 ...
rajacs50's user avatar
0 votes
1 answer
63 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 ...
Mary91gr's user avatar
0 votes
0 answers
23 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, ...
shehabeldin.21's user avatar
0 votes
1 answer
431 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....
RomanBlade's user avatar
0 votes
1 answer
15 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 ...
Joel Banks's user avatar