我是 Python 新手,我最近 1 周前开始学习,但我被困在这里......任何帮助将不胜感激......
from tkinter import *
import tkinter as tk
import psycopg2
root = Tk()
def get_info(Employee_Name, Department, Education,Salary):
con = psycopg2.connect(dbname = 'postgres',user = 'postgres',password = 'Gaurav@31',host = 'localhost',port = 5432)
cur = con.cursor()
query = ('''INSERT INTO Employee (Employee_name, Department, Education,Salary) VALUES (%s,%s,%s,%s);''' )
cur.execute(query,(Employee_Name, Department, Education,Salary))
print('Data inserted Successfully')
con.commit()
con.close()
display_all()
def search(emp_id):
con = psycopg2.connect(dbname = 'postgres',user = 'postgres',password = 'Gaurav@31',host = 'localhost',port = 5432)
cur = con.cursor()
query = ('''SELECT * …Run Code Online (Sandbox Code Playgroud)