How can I get a row in Sqlite3 table with Tkinter Listbox widget?
问题 I have Python program connected to Sqlite3 database with Tkinter on the frontend. My database table (subjectlist) consists of four columns: [id (unique interger), subject (text), serial (unique interger), is_active (boolean interger)]. Here is my program: import sqlite3 from tkinter import * conn = sqlite3.connect('database.db') c = conn.cursor() c.execute('SELECT COUNT() FROM subjectlist WHERE is_active = 1') number = c.fetchone()[0] c.execute('SELECT * FROM subjectlist WHERE is_active = 1