Inserting variables to database table - SQLite3 with Python 3 part 2

preview_player
Показать описание
In the previous SQLite tutorial, we learned how to create a database, a table, and how to insert data. In this tutorial, we're going to build on that, covering how to insert dynamically into a database's table, using variables.

Рекомендации по теме
Комментарии
Автор

I started out programming as a hobbyist for about 2 years, simply just using VBA for automating a decent chunk of the reports i conduct for work just because i thought it was fun too. The past year or so I've been hitting programming hard and now I'm tasked with making a barcode scanning system that updates a database in real time!! I cant wait to start researching and building this!!!

But along the way of learning how to program, I've watch a lot of your videos, and i have so much to learn!! You are an awesome teacher and i hope you keep making videos, thanks so

langman
Автор

I would just like to say, this video means this world to me as it finally helped me get past a hurdle on my dissertation, THANK YOU SO MUCH.

dayinthedark
Автор

i was looking all online and i saw this answer but the ???? had me like ???? but hearing someone say how it works helped more than anything <3

jtwp
Автор

thanks! excellent tutorial. completely new to python here and attempting to port some code across from powershell to make it cross platform.

Your tutorials are making my life so much easier :)

lmaoroflcopter
Автор

thanks i spended 2 h and later i watched this video thankssss

alexandruciobanu
Автор

Hey dude, keep up your good work! Thanks !

venkatkumar
Автор

It worked fine for me on a small dataset. But when I tried to run the for loop for a million times for a large dataset, the process of insertion is very low. Any help how to fasten it.

deepakkumar-rzff
Автор

Is there a way to create a table with an indefinite number of columns, by passing a list of values for example??

CrEpUsCuLo
Автор

I tried to pass a variable but sqllite table just print blanks rows every time no error also displayed ?

ashinkunjumon
Автор

Hi, it's me trought the time portal :)
I would like to ask what happen with the def data_entry() which was filled manually, if the second part of the code have already the def dynamic_data_entry()... should we delete the def data_entry() to "clean" the code or add # at the beginning of each line at that module? thanks :)))

nochanelk
Автор

Great stuff...I'm running python 3.62 on a windows 10 machine. I found that python prefers that the code to insert into a table be written as follows:

unix = time.time()
datestamp = time.strftime('%Y-%m-%d %H:%M:%S')
keyword = 'Python'
value = random.randrange(0, 10)
params = (unix, datestamp, keyword, value)
c.execute("INSERT INTO stuffToPlot VALUES (?, ?, ?, ?)", params)

peterkoppelman
Автор

Thank you so much ! Can you show me how to create a database view in sqlite and use it in django ?

bricegnanago
Автор

Your explication is ammazing!! But how can I insert a full text in database?

noname
Автор

Thank you very much for such a useful tutorial!

KatyaKharitonova
Автор

thank you so much sentdex, i have seen the error actually in video it wasn't there the type conversion of int from time.time , but on the website i have seen this hope this is the correct one .

AbhijeetSingh-oyrs
Автор

great video and help me a lot with my first GUI software, but I am stuck now with checkbutton values and how to insert them to sqllite3 Database, if you would help me I will appreciate it, thanks in advance.

ab-jv
Автор

matching the variable names added, , to the column names seems unnecessary. When learning this it is worse than unnecessary. Am I wrong?

mrphysh
Автор

Can you read multiples XML and store them in SQLite?

edgarsan
Автор

what if "Stufftoplot" is also dynamic?

Freddan
Автор

so when I re run my code without deleting database I get duplicates. Is there a way to check if the value exists and not insert the duplicate? I have unique identifier for each of my rows

BuhnanaFone