Doing a flask experiment can't solve this MySQL problem, keep getting this error:
_mysql_exceptions.ProgrammingError: (1064, "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 '@gmail.com,3)' at line 1")
This is my code for the query and also the submission to the database:
username = form.username.data
email = form.email.data
password = form.password.data
#TODO ENCRYPT PASSWORDS
cursor = mysql.connection.cursor()
query = "insert into Users
values ('" + username+"',"''+email+"','"+password+"')"
cursor.execute(query)
mysql.connection.commit()
cursor.close()
I have tried all the solutions that were suggested in other questions but none of them have worked.