Skip to content

Commit 020c9a2

Browse files
Python Tkinter Add Input Boxes For Our CRM Tool start
1 parent f7d6d12 commit 020c9a2

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Python Tkinter Add Input Boxes For Our CRM Tool
2+
3+
from tkinter import *
4+
from PIL import ImageTk, Image
5+
import mysql.connector
6+
7+
root = Tk()
8+
root.title('Python Tkinter Add Input Boxes For Our CRM Tool')
9+
root.iconbitmap('Python Tkinter Add Input Boxes For Our CRM Tool/check.ico')
10+
root.geometry("400x200")
11+
12+
#Connect to MYSQL
13+
mydb = mysql.connector.connect(
14+
host="127.0.0.1",
15+
port = 3308,
16+
user="briandb",
17+
password="briandb",
18+
database = "crm",
19+
)
20+
21+
#Chack to see if connection to MYSQL was created
22+
# print(mydb)
23+
24+
#create a cursor and initialize it
25+
my_cursor = mydb.cursor()
26+
27+
# Create Database
28+
#my_cursor.execute("CREATE DATABASE crm")
29+
30+
#Test to seee if database was created
31+
#my_cursor.execute("SHOW DATABASES")
32+
#print(my_cursor)
33+
#for db in my_cursor:
34+
# print(db)
35+
36+
# Create Table
37+
#my_cursor.execute("CREATE TABLE customers (first_name VARCHAR(255), last_name VARCHAR(255), zipcade INT(10), price_paid DECIMAL(10, 2), user_id INT AUTO_INCREMENT PRIMARY KEY)")
38+
39+
my_cursor.execute("SELECT * FROM customers")
40+
print(my_cursor.description)
41+
42+
for thing in my_cursor.description:
43+
print(thing)
44+
45+
root.mainloop()
Binary file not shown.

0 commit comments

Comments
 (0)