Untitled
Anonymous
Plain Text
01/03/2024 7:14 AM
391 B
24
Indexable
Never
# Customer - Sign Up
def customer_sign_up():
try:
customer_name = input("Enter your name: ")
cur.execute("INSERT INTO Customers (CustomerName) VALUES (%s)", (customer_name,))
con.commit()
print(f"Account created successfully for {customer_name}!")
except mysql.connector.Error as err:
print(f"Error: {err}")
con.rollback()
Editor is loading...
Leave a Comment