2:
查询数据库所有的内容!
3:
链接数据库:
4:最终的打包!
话不多说直接上代码!!!!
from tkinter import *
import pymysql
from tkinter.messagebox import *
from tkinter import ttk
def get_connect():
conn = pymysql.connect(host=‘localhost’, user=“root”, passwd=‘GAO147258369’,database=‘stu’)
return conn
window = Tk()
window.geometry(‘500x300’)
window.title(‘登录账号!’)
def create():
root =Toplevel()
root.geometry(‘700x800’)
root.title(‘学生管理系统’)
Label(root, text=“学号:”).place(relx=0, rely=0.05, relwidth=0.1)
Label(root, text=“姓名:”).place(relx=0.5, rely=0.05, relwidth=0.1)
Label(root, text=