can someone help?
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\huzey\AppData\Local\Programs\Python\Python39\lib\site-packages\mysql\connector\connection_cext.py", line 506, in cmd_query
_mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\huzey\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__
return self.func(*args)
File "c:\Users\huzey\OneDrive\Masaüstü\gui\loginsystem.py", line 198, in add_customer
my_cursor.execute(sql_command, values)
File "C:\Users\huzey\AppData\Local\Programs\Python\Python39\lib\site-packages\mysql\connector\cursor_cext.py", line 269, in execute
result = self._cnx.cmd_query(stmt, raw=self._raw,
File "C:\Users\huzey\AppData\Local\Programs\Python\Python39\lib\site-packages\mysql\connector\connection_cext.py", line 510, in cmd_query
raise errors.get_mysql_exception(exc.errno, msg=exc.msg,
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
to use near ')' at line 1
this is the full error and this is the part of the code that have error:
def add_customer():
sql_command = "INSERT INTO customers (first_name, last_name, addres, phone, email, age, country, rent) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, )"
values = (first_name_box.get(), last_name_box.get(), address_box.get(), phone_box.get(), email_box.get(), age_box.get(), country_box.get(), rent_box.get())
my_cursor.execute(sql_command, values)
mydb.commit()
clear_all()
btw im tryng to make a real estate managment system. if you have any idea im open to new ideas and about the code i can give details if you want.
addres(should beaddress)