+ 1

[SOLVED] cant print from database!

start learning sqlite3 in python when i try print the table from this database , it give nothing https://code.sololearn.com/c6kkf7vy9GVG/#py look at line 25 : 30 how i can fix it ?

1st Nov 2017, 6:19 PM
khaled Fathi
khaled Fathi - avatar
6 Answers
+ 8
No problem. I took your code and cleaned it up a bit, check it out: https://code.sololearn.com/c33oM8z0BW5h/?ref=app
1st Nov 2017, 8:55 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 7
So what kind of error does it show?
1st Nov 2017, 8:44 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 6
What kind of exception does it raise? I can't check it as it fires off encoding issues for me at Sololearn. But here's my code on sqlite, I used similar commands to create and manage a database on-the-fly. You might check it out as it is definitely working here at SL: https://code.sololearn.com/csyhsIovmZJ3/?ref=app
1st Nov 2017, 7:22 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Ops . now i got it . i was use method commit() with execute not connect thank you :)
1st Nov 2017, 9:08 PM
khaled Fathi
khaled Fathi - avatar
0
your script is advanced . its my first day into database in general . i just want to know where is the wrong in my script . i copy it from book to learn it .
1st Nov 2017, 8:42 PM
khaled Fathi
khaled Fathi - avatar
0
it doesn't print anything . i tried to list , tuple the result is empty . but same code in book show the tuple of data sorry. bad english
1st Nov 2017, 8:47 PM
khaled Fathi
khaled Fathi - avatar