pet cannot be added 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'of birth, gender_id, cat_id, picture, instock) values ('coco','pitbull','425....' at line 1
sql = "INSERT into tblpet (name, breed, price, color, age, date of birth, gender_id, cat_id, picture, instock) values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
#add the form variables for each column
val = (name, breed, price, color,age,dt, gender, cat, filepath, instk)
cur.execute(sql, val)
con.commit()
What I have tried:
i checked all my database and checked the code but enable to find the problem.