当前位置:网站首页>Error reporting: SQL syntax error in flask. Fields in SQL statements need quotation marks when formatting
Error reporting: SQL syntax error in flask. Fields in SQL statements need quotation marks when formatting
2022-07-29 01:13:00 【:D...】
Project scenario :
Use flask Building framework Connect mysql Error occurs when inserting data into the table
You have a mistake in your SQL grammar ; Please check MySQL The manual corresponding to the server version , In the first line
'@qq.com)'Use correct syntax nearby "
Screenshot of error reporting


Cause analysis :
primary sql sentence :
sql = f"""insert into user values ({uname}, {pwd}, {mobile}, {email})"""
sql The fields in the statement are not quoted
Solution :
Quote all fields
sql = f"""insert into user values ('{
uname}', '{
pwd}', '{
mobile}', '{
email}')"""
边栏推荐
- [notes for question brushing] delete continuous nodes with a total value of zero from the linked list
- Recursion and divide and conquer
- 【刷题笔记】链表内指定区间反转
- How to smoothly go online after MySQL table splitting?
- RHCE命令练习(一)
- 线程锁及锁的升降级
- LeTax记录\documentclass{},authoryear属性使用
- Textkit custom uilabel identification link
- Y80. Chapter 4 Prometheus big factory monitoring system and practice -- Kube state metrics component introduction and monitoring extension (XI)
- 新拟态个人引导页源码
猜你喜欢

Univariate function integration 1__ Indefinite integral

Connect with Alipay payment

Recursion and divide and conquer

Principle and usage setting of large page memory

Introduction to FLV documents

In the second round, 1000 okaleido tiger were sold out in one hour after logging in to binance NFT again

Oozie工作调度

面试突击69:TCP 可靠吗?为什么?

大页内存原理及使用设置
![[AD learning] the course of PCB drawing in this marine vehicle competition](/img/37/211a0557848f6922fda7a69a114923.png)
[AD learning] the course of PCB drawing in this marine vehicle competition
随机推荐
Charles -- teach you how to use the packet capturing tool from 0-1
Linux Redis 源码安装
[Commons lang3 topic] 005- objectutils topic
🧐 Table1 | finish your third line watch in one second
Talk about the cross end technical scheme
MySQL stored procedure realizes the creation of a table (copy the structure of the original table and create a new table)
【刷题笔记】链表内指定区间反转
【mysql】字符串转int
如何执行建设项目的时间影响分析?
Principle and usage setting of large page memory
一元函数积分学之1__不定积分
LeTax记录\documentclass{},authoryear属性使用
RHCE命令练习(二)
Hilbert 变换与瞬时频率
B- 树 ~
QT静态编译程序(Mingw编译)
Day2:三种语言暴刷牛客130题
Oozie工作调度
进程和线程知识点总结1
State compression DP Mondrian's dream