Replies: 3 comments 1 reply
-
Remove Make sure to check your terminal/console, as you will receive error messages when you try to make use of stuffs not present in Flet. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Can you share more details to your environment (OS, Flet version etc)? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
import flet as ft
import sqlite3
def fetch_data(table_name):
connection = sqlite3.connect('post_office.db')
cursor = connection.cursor()
cursor.execute(f"SELECT * FROM {table_name}")
rows = cursor.fetchall()
cursor.execute(f"PRAGMA table_info({table_name})")
columns_info = cursor.fetchall()
column_names = [col[1] for col in columns_info]
connection.close()
return column_names, rows
def add_customer(initials, adress, phone, email):
connection = sqlite3.connect('post_office.db')
cursor = connection.cursor()
cursor.execute("INSERT INTO Customers (Initials, Adress, Phone, Email) VALUES (?, ?, ?, ?)",
(initials, adress, phone, email))
connection.commit()
connection.close()
def main(page: ft.Page):
page.title = "Post Office Management System"
page.bgcolor = '#ebebeb'
page.window_maximized = True
ft.app(target=main)
when I run the code, nothing happens and so with any code where there is import flet as ft
Beta Was this translation helpful? Give feedback.
All reactions