当前位置:网站首页>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边栏推荐
- golang代码检查工具
- February 13, 2022-4-symmetric binary tree
- Alibaba Tianchi SQL training camp task4 learning notes
- Basic knowledge of database (interview)
- Go language implementation principle -- lock implementation principle
- Multi camera stereo calibration
- Registration of Electrical Engineering (elementary) examination in 2022 and the latest analysis of Electrical Engineering (elementary)
- (4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
- 2.13 summary
- [screen recording] how to record in the OBS area
猜你喜欢
Realize reverse proxy client IP transparent transmission
98. 验证二叉搜索树 ●●
Week 17 homework
视频标准二三事
YML configuration, binding and injection, verification, unit of bean
Registration of Electrical Engineering (elementary) examination in 2022 and the latest analysis of Electrical Engineering (elementary)
Getting started stm32--gpio (running lantern) (nanny level)
PLC编程基础之数据类型、变量声明、全局变量和I/O映射(CODESYS篇 )
Matlab smooth curve connection scatter diagram
Expectation, variance and covariance
随机推荐
Basic knowledge of database (interview)
Composition of interface
Sum of two numbers, sum of three numbers (sort + double pointer)
Three. JS VR house viewing
Idea rundashboard window configuration
[original] what is the core of programmer team management?
2.13 summary
Déterminer si un arbre binaire est un arbre binaire complet
东南亚电商指南,卖家如何布局东南亚市场?
The PNG image is normal when LabVIEW is opened, and the full black image is obtained when Photoshop is opened
Go language implementation principle -- lock implementation principle
VS2010 writes DLL and unit test of dynamic link library, and transfers the correctness of DLL test
It is proved that POJ 1014 module is optimized and pruned, and some recursion is wrong
Leetcode buys and sells stocks
LeetCode——Add Binary
Selenium+pytest automated test framework practice
Live tiktok shop 2022 latest gameplay card slot overseas live e-commerce new traffic
Initial experience | purchase and activate typora software
Scala concurrent programming (II) akka
UVA – 11637 Garbage Remembering Exam (组合+可能性)