推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
touch
V2EX  ›  Python

请教个 python mysqldb commit()的问题

  •  
  •   touch · Apr 10, 2014 · 7469 views
    This topic created in 4595 days ago, the information mentioned may be changed or developed.
    mysql是不是插入数据的时候都要commit()。有其他方法吗?
    5 replies  •  1970-01-01 08:00:00 +08:00
    binux
    binux
    Apr 10, 2014
    1
    db.autocommit = True
    touch
    touch
    OP
    Apr 10, 2014
    2
    @binux 尝试了一下。依旧只是在当前会话中。并没有提交到数据库中
    casparchen
    casparchen
    Apr 10, 2014 via iPad
    3
    注意会话的作用域
    jedywu
    jedywu
    Apr 10, 2014
    4
    应该是db.autocommit(True)
    touch
    touch
    OP
    Apr 10, 2014
    5
    感谢各位,学习了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1043 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:30 · PVG 00:30 · LAX 08:30 · JFK 11:30
    ♥ Do have faith in what you're doing.