INSERT INTO report(NAME,keyword,refile,content,DATE,STATUS) VALUES ('%s','%s','%s','%s','%s',0)%("name", "key", "refile", "content",str(datetime.now()))
report errors
ERROR CODE: 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 'key,refile,content,date,status) VALUES ('%s','%s','%s','%s','%s',0)%("name", "ke' at line 1
The keyword of MySQL is used. After modification
sql="INSERT INTO report(`name`,`keyword`,`refile`,`content`,`date`,`status`) VALUES ('%s','%s','%s','%s','%s',0)"%(name,key, refile, content,str(datetime.now()))
Read More:
- MySQLdb._exceptions.ProgrammingError appears when scrapy crawls Weibo hot comments
- Python TypeError: Unrecognized value type: <class ‘str‘>dateutil.parser._parser.ParserError: Unknow
- Python Use sqlalchemy Error: pymssql.ProgrammingError: (102, b“Incorrect syntax near ‘(‘.DB-Lib error
- Python time tuples are converted to timestamps, strings
- [Solved] Python Error: positional argument follows keyword argument
- AttributeError: DatetimeProperties object has no attribute
- [Solved] RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at
- Python_Syntax error: unexpected character after line continuation character
- [Solved] CONDA ENV create and run Error: F environment.yml under win10
- Python Time Module timestamp, Time string formatting and Conversion (13-bit timestamp)
- Python server run code ModuleNotFoundError Error [How to Solve]
- Pyexcel Error: xlrd.biffh.XLRDError: Excel xlsx file; not supported
- Pip3 install Mysqlclient Error: Command “python setup.py egg_info“ failed with error
- [Solved] ParserError: NULL byte detected. This byte cannot be processed in Python‘s native csv library
- [Solved] Python operate Kafka error: SyntaxError: invalid syntax
- Robotframework post error“:“Internal Server Error“,“message“:“syntax error, expect
- PIP Install Mysqlclient error C1083: Cannot open include file: ‘mysql.h‘: No such file or directory
- [Solved] Odoo Cannot log in error after the Database is Recovered
- Python Openyxl Error: AttributeError: ‘int‘ object has no attribute ‘upper‘ [How to Solve]
- How to Solve Turtle_tf Error in ROS