BAE如何向MySQL增加记录?
bae吧
全部回复
仅看楼主
level 1
17678504_ 楼主
用的Python,代码如下(idx为int型):
cmd = "INSERT INTO huodong (idx) VALUES (21)"
a = cursor.execute(cmd)
运行之后a的值为1,程序也不报错,但是用phpMyAdmin查看数据库,就是没有添加。
在phpMyAdmin中直接执行"INSERT INTO huodong (idx) VALUES (21)",又添加的十分顺利。
请问一下,这是神马回事,怎么解决,求大神。。。
2013年11月19日 11点11分 1
level 9
不知道回复什么了
2013年11月19日 14点11分 2
level 9
我是来帮忙顶贴的
2013年11月19日 17点11分 3
level 9
挽尊
2013年11月20日 00点11分 4
level 1
17678504_ 楼主
(瞪眼)
2013年11月20日 02点11分 5
level 9
只能帮你到这了
2013年11月20日 04点11分 6
level 9
只能帮你到这了
2013年11月20日 09点11分 7
level 9
只能帮你到这了
2013年11月20日 12点11分 8
level 9
帮顶
2013年11月20日 14点11分 9
level 9
不懂帮顶
2013年11月20日 18点11分 10
level 9
不懂帮顶
2013年11月20日 23点11分 11
level 9
只能帮你到这了
2013年11月21日 02点11分 12
1