can I put my sqlite connection and cursor in a function?
- by steini
I was thinking I'd try to make my sqlite db connection a function instead of copy/pasting the ~6 lines needed to connect and execute a query all over the place.
I'd like to make it versatile so I can use the same function for create/select/insert/etc...
Below is what I have tried. The 'INSERT' and 'CREATE TABLE' queries are working, but if I do a…