当前位置:网站首页>Pymysql inserts data into MySQL and reports an error for no reason
Pymysql inserts data into MySQL and reports an error for no reason
2022-06-24 08:45:00 【YJ】
A strange and magical thing , In the use of pymysql towards MySQL In the process of inserting data , Report the following error ( There is no error in inserting some tables !)
pymysql.err.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 ‘- Pay buyers , Number of buyers paid by fans , Buy more goods - Pay buyers , Guide store ’ at line 1”)
The insertion form of the data used is as follows :
insert into Business Consultant _ Wireless store source data ( date , Source of flow , Source details , Number of visitors , The number of visitors has been compared month on month , Order amount , Change in order amount , Number of buyers to place an order , Change in the number of buyers placing orders , Order conversion rate , Order conversion rate changes , Pay the amount , Change in payment amount , Pay buyers , Change in the number of paying buyers , Payment conversion rate , Payment conversion rate changes , Customer unit price , Change in customer unit price ,UV value ,uv Value change , Pay attention to the number of store buyers , Pay attention to the changes in the number of store buyers , Number of buyers of collection goods , Changes in the number of buyers of collections , Number of additional buyers , Changes in the number of additional buyers , New visitors , New visitor changes , Direct payment to buyers , Collect goods - Pay buyers , Number of buyers paid by fans , Buy more goods - Pay buyers , Number of visitors to the guide store page , Guide the number of visitors to the store page to change ) values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
Wrong guess :
It is estimated that the field is too long, resulting in an exception in the insertion
You can use the second method to insert data
# The first way
insert into Table name ( Field name 1, Field name 2,...) values( value 1, value 2,...);
# The second way : Insert data according to all fields in the table , It must be consistent with the order in which the fields are defined in the table
insert into Table name values( value 1, value 2,...);
边栏推荐
- How to mount a USB hard disk with NTFS file format under RHEL5 system
- js中通过key查找和更新对象中指定值的方法
- mysql组合索引的有序性
- 一文讲透,商业智能BI未来发展趋势如何
- 数据平台简介
- 关于ETL看这篇文章就够了,三分钟让你明白什么是ETL
- [micro services ~nacos] Nacos service providers and service consumers
- liunx 更改 vsftpd 的端口号
- Using ngrok for intranet penetration
- Redis的Cluster集群数据倾斜
猜你喜欢

ZUCC_编译语言原理与编译_实验05 正则表达式、有限自动机、词法分析

Send custom events in QT

uniapp 热更新后台管理

教程篇(5.0) 08. Fortinet安全架构集成与FortiXDR * FortiEDR * Fortinet 网络安全专家 NSE 5

Background management of uniapp hot update

成为IEEE学生会员

Maya re deployment

ZUCC_ Principles of compiling language and compilation_ Experiment 0607 grammar analysis ll analysis

K8S部署高可用postgresql集群 —— 筑梦之路

liunx服务器 telnet 带用户名 端口登陆方法
随机推荐
ZUCC_编译语言原理与编译_实验05 正则表达式、有限自动机、词法分析
分布式 | 如何与 DBLE 进行“秘密通话”
【团队管理】测试团队绩效管理的25点小建议
xtrabackup做数据备份
RuntimeError: Missing dependencies:XXX
提高INSERT速度
获取屏幕宽高工具类
Application of tidb in Netease games
[acnoi2022] not a structure, more like a structure
Fundamentals of 3D mathematics [17] inverse square theorem
rsync做文件备份
ZUCC_ Principles of compiling language and compilation_ Experiment 05 regular expression, finite automata, lexical analysis
Maya re deployment
There was an error checking the latest version of pip
js中通过key查找和更新对象中指定值的方法
Several schemes of PHP code encryption
Shell basic operator -- arithmetic operator
2021-06-24: find the length of the longest non repeating character substring in a string.
liunx服务器 telnet 带用户名 端口登陆方法
ZUCC_ Principles of compiling language and compilation_ Big job