热门排行
简介
MySQL for Python是 Python 语言连接 MySQL 数据库的接口,MySQLdb为Python提供了MySQL支持,它符合Python DB API版本2.0的要求。
代码示例:
[code]
import _mysqdb=_mysql.connect(host="outhouse",port=3307,passwd="moonpie",db="thangs")
db.query("""SELECT spam, eggs, sausage FROM breakfast WHERE price < 5""")
[/code]
代码示例:
[code]
import _mysqdb=_mysql.connect(host="outhouse",port=3307,passwd="moonpie",db="thangs")
db.query("""SELECT spam, eggs, sausage FROM breakfast WHERE price < 5""")
[/code]