r/programminghelp • u/[deleted] • Sep 02 '20
Python SQLite Database Query
Hey all,
I'm creating a little fun project of a macros tracker using Python GUI modules and SQLite3.
One part that i'm stuck on and have tried to ignore it for days is inputting information to a database using a dropdown box.
For example the dropdown box could have: chicken
mince
chocolate
Now if I select one of these and click submit, I want the submit button to input the selected item (e.g chocolate) along with it's macros (protein, carbs, fats) to a new database.
At present I can only send the name to the new database and not the other macros alongside it.
Any help would be great,
Many Thanks
4
Upvotes
1
u/amoliski Sep 02 '20
How are you planning on using the data in the database?
When you say the protein/carbs/fats for each item are in another database, do you mean it's in a database that you control, or is it someone else's database you are accessing with an API? Or do you just mean a separate table within your own database?