《Python Database学习》的相关内容
相关博客
Python MySQL
1.下载并安装MySQLdb模块
2.实例代码:
#-*- coding: utf-8 -*-
import sys, MySQLdb
conn=MySQLdb.connect(host="127.0.0.1", user="root", passwd="password", db="test", char ...
by gq913 2008-08-05 浏览 (51) 回复 (0) 关键字: python
初试Python 操作Mysql
#!/usr/bin/python
# -*- coding: utf8 -*-
import MySQLdb
conn=MySQLdb.connect(host="localhost",user="root",passwd="phpcool",db="device")
cursor=conn.cursor()
cursor.execute("SET NAMES utf8")
curs ...
by 23c 2008-05-08 浏览 (124) 回复 (0) 关键字:
pysqlite usage
使用二进制数据
The following example demontrates how to use Blobs to add images to from a database and write them back to the filesystem again. It was posted to the mailing list by S. Dave Rose.
from pysqli ...
by approach 2008-03-08 浏览 (244) 回复 (0) 关键字:
使用pymssql调用存储过程
#coding:gbk
"""
调用pymssql,链接数据库,并执行存储过程,并返回结果
"""
import pymssql
#链接远程数据库
con=pymssql.connect(host='192.168.0.15',user='sa',password='sa',database='mydb')
cur=con.cursor()
#执行sql语句
cur.execut ...
by cooldesigner 2007-04-28 浏览 (433) 回复 (0) 关键字: pymssql
mysql-python 异常
centos5
python2.5.2
mysql-python1.2.2
import MySQLdb
import sys
db=MySQLdb.connect(user="##",passwd="##",db="##",host="######",port=3306)
cur=db.cursor(MySQLdb.cursors.Cursor)
sql="show tables" ...
by baitian 2008-08-29 浏览 (37) 回复 (0) 关键字:

