-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.py
More file actions
30 lines (18 loc) · 742 Bytes
/
text.py
File metadata and controls
30 lines (18 loc) · 742 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
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
from tkinter import filedialog
import pymysql
import mysql.connector
from mysql.connector import Error
from mysql.connector import errorcode
connection = pymysql.connect(host='localhost',database='vehicle',user='root',password='')
cursor = connection.cursor()
def textFeed(plate_no,color,make,b_type,model):
x=(plate_no,color,make,b_type,model)
print(x)
query = """INSERT INTO crime_record(plate_no, color, make,body_type,model)
VALUES (%s,%s,%s,%s,%s) """
cursor.execute(query,x)
connection.commit()
messagebox.showinfo("Success!","Inserted into blacklist")