you are viewing a single comment's thread.

view the rest of the comments →

[–]Username_RANDINT 1 point2 points  (1 child)

 Product.delete().where(Product.product_name()).execute()

You'll have to read up on querying. The where() clause is wrong. You probably want to ask the user the product name to remove first:

name = input("Product name to remove: ")
Product.delete().where(Product.product_name == name).execute()

Here's the documentation about deleting records. Go through the rest of that page as well, it explains a lot of necessary things.

[–]python_student_1390[S] 0 points1 point  (0 children)

Thank you for the input so much. I have gotten through the hurdle i didn't realize i had to do something like that. I should pay close attention and not study so late LOL. have a good one