python插入mysql新值
2024-09-15 23:10:07
#Server Connection to MySQL: import MySQLdb
conn = MySQLdb.connect(host= "localhost",
user="root",
passwd="newpassword",
db="engy1")
x = conn.cursor() try:
x.execute("""INSERT INTO anooog1 VALUES (%s,%s)""",(188,90))
conn.commit()
except:
conn.rollback() conn.close()
最新文章
- Dynamics AX 2012 R2 耗尽用户
- Java -- 根据当前日期获取当前一周的所有日期
- PHP多表取数据的代码优化
- [转载]新手入门:Spring的一些学习方法及意见
- AutoCAD.NET 不使用P/Invoke方式调用acad.exe或accore.dll中的接口(如acedCommand、acedPostCommand等)
- HTML_创建易用的Web表单
- 20. atoi函数
- Linq to SQL 简单增删改查
- android开发之merge结合include优化布局
- Bat命令知识[转]
- [原创]python MySQLdb在windows环境下的安装、出错问题以及解决办法
- Visual Studio 如何给生成的exe加入多个图标资源
- 41个有关Python的小技巧【转】
- [Swift]LeetCode421. 数组中两个数的最大异或值 | Maximum XOR of Two Numbers in an Array
- Hive篇---Hive与Hbase整合
- 手动调用run方法和普通方法调用没有区别
- odoo8 和odoo10区别
- (转)spring中的拦截器(HandlerInterceptor+MethodInterceptor)
- nodeJS总结day1
- laravel调度任务
热门文章
- HTML-input标签需设置的属性
- 一些常用数据库操作在mysql及sql server中实现方式的差异
- 十、oracle 常用函数
- 自定义控件之--继承控件(圆形TextView)
- android应用的优化建议(转载)
- POJ 3419 Difference Is Beautiful
- c语言-error C2440: “static_cast”: 无法从“UINT (__thiscall CHyperLink::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
- 第三十九节,python内置全局变量
- 利用DataImportHandler建索引时一直无法完成
- Why isn't sizeof for a struct equal to the sum of sizeof of each member?