Delete Many Selected Database Records - Python Tkinter GUI Tutorial 180

preview_player
Показать описание
In this video we'll learn how to delete many selected records from the database and the treeview for tkinter and python.

We already have the ability to select multiple records in the treeview. In this video we'll delete those selections from the database.

#tkinter #codemy #JohnElder

Timecodes
0:00​​ - Introduction
2:10 - Create Message Box On Delete
2:35 - Add Database Connection and Cursor
3:37 - Select Items From Treeview
4:43 - Determine Record ID from Treeview Selected Item
8:18 - Add ID's To A List
10:00 - Remove From Table With Executemany
14:14 - Convert ids_to_delete to Tuple
15:20 - Conclusion
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:
▶️ Get The Code

Codemycom
Автор

You are great! Your Tutorials helped me a lot .Thank you so much.

techshots
Автор

Sir when I add some data with add button it's get added and when I try to delete the added data it doesn't get deleted what is the solution for that

sunitarajesh
Автор

hi.I like your videos very very much.but please add auto search entry by keyreleas for this project.thank you

امیراستارپاکوتمیز
Автор

Very great and useful video, thank you so much.
Can you please guide me how can i reset numbers of rows(or primary keys) after deleting one?

fargolrakhshan
Автор

hi mister john i am very grateful for you and i have learned so much from you but i have one problem that when i delete the record it only deleted if i choose the top one i didn't figure out why

#remove records
def remove_records():
#designate selection
x = my_tree.selection()[0]
my_tree.delete(x)
# creating th database
conn =
# create a cursor.instance
c = conn.cursor()
c.execute('DELETE from customers WHERE oid='+ id_en.get())
# commit changes
conn.commit()
# close our connection
conn.close()
clear_records()

bahaazarqah
welcome to shbcf.ru