r/programminghelp • • 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

5 comments sorted by

View all comments

1

u/[deleted] Sep 02 '20

Post your existing code (Rule #2)

1

u/[deleted] Sep 02 '20

Good rule.

7 hours later and I've just solved this, over the moon!

1

u/[deleted] Sep 03 '20

Just remember to give the rules a look over the next time you post so it doesn't get removed.