-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyy.py
More file actions
40 lines (26 loc) · 982 Bytes
/
yy.py
File metadata and controls
40 lines (26 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import hojo
import pymysql
from tkinter import *
from tkinter import messagebox
import mysql.connector
connection = pymysql.connect(host='localhost',user='root',password='root',db='bank')
cursor=connection.cursor()
sql = "INSERT INTO bank(fn,mn,ln,an,pa,pn,em,gn) VALUES (%s, %s, %s, %s, %s, %s, %s,%s)"
try:
cursor.execute(sql,(hojo.app[0],hojo.app[1],hojo.app[2],hojo.app[3],hojo.app[4],hojo.app[5],hojo.app[6],hojo.app[7]))
print("successsul")
class tjj:
def __init__(self):
window=Tk()
window.eval('tk::PlaceWindow %s center' % window.winfo_toplevel())
window.withdraw()
messagebox.showinfo('CONGRATULATION!!!','DATA HAS BEEN RECORDED :)')
window.deiconify()
window.destroy()
window.quit()
if __name__ == '__main__':
tjj()
except:
import rr
#result=cursor.fetchall()
connection.commit()