当前位置:网站首页>How to insert data into MySQL database- How can I insert data into a MySQL database?
How to insert data into MySQL database- How can I insert data into a MySQL database?
2022-07-05 23:22:00 【Rich in starch】
problem :
I want to insert the integers 188 and 90 in my MySQL database, but the following code doesn't work: I want to be in my MySQL Insert an integer into the database 188 and 90, But the following code doesn't work :
import MySQLdbconn = MySQLdb.connect(host= "localhost", user="root", passwd="newpassword", db="engy1")x = conn.cursor()x.execute("SELECT * FROM anooog1")x.execute (" INSERT INTO anooog1 VALUES ('%s','%s') ", (188,90))row = x.fetchall()
Why doesn't it work? Why doesn't it work ?
Solution :
Reference resources : https://stackoom.com/en/question/NrdO边栏推荐
- UVA – 11637 Garbage Remembering Exam (组合+可能性)
- February 13, 2022 -5- maximum depth of binary tree
- Neural structured learning 4 antagonistic learning for image classification
- Rethinking about MySQL query optimization
- Using LNMP to build WordPress sites
- 11gR2 Database Services for "Policy" and "Administrator" Managed Databases (文件 I
- C Primer Plus Chapter 9 question 9 POW function
- Fix the memory structure of JVM in one article
- (4) UART application design and simulation verification 2 - RX module design (stateless machine)
- 2022 registration examination for safety management personnel of hazardous chemical business units and simulated reexamination examination for safety management personnel of hazardous chemical busines
猜你喜欢
YML configuration, binding and injection, verification, unit of bean
Scala concurrent programming (II) akka
Realize reverse proxy client IP transparent transmission
98. 验证二叉搜索树 ●●
Common JVM tools and optimization strategies
Alibaba Tianchi SQL training camp task4 learning notes
3: Chapter 1: understanding JVM specification 2: JVM specification, introduction;
Sum of two numbers, sum of three numbers (sort + double pointer)
数据库基础知识(面试)
698. 划分为k个相等的子集 ●●
随机推荐
Composition of interface
媒体查询:引入资源
Media query: importing resources
Getting started stm32--gpio (running lantern) (nanny level)
(4) UART application design and simulation verification 2 - RX module design (stateless machine)
asp.net弹出层实例
6-axis and 9-axis IMU attitude estimation
Element positioning of Web Automation
C Primer Plus Chapter 9 question 9 POW function
Dynamic memory management (malloc/calloc/realloc)
派对的最大快乐值
Xinyuan & Lichuang EDA training camp - brushless motor drive
regular expression
Summary of binary tree recursive routines
Neural structured learning 4 antagonistic learning for image classification
UVA – 11637 garbage remembering exam (combination + possibility)
CJ mccullem autograph: to dear Portland
Data type, variable declaration, global variable and i/o mapping of PLC programming basis (CoDeSys)
grafana工具界面显示报错influxDB Error
ORB_ SLAM2/3