1.1. ¶
- 파 DB API Spec 2.0 해 함( 하 )
- connect
user - username (NULL)
passwd - password (no password)
db - database name (NULL)
port - integer, TCP/IP port
unix_socket - TCP 할 unix
client_flag - integer, 할 하 한 flag (0)
.
~cpp
import MySQLdb
con =MySQLdb.connect(user="name", passwd="password", db="databasename")
cur = con.cursor()
cur.execute("select * from owiki_page_name")
print cur.description
print cur.rowcount
res = cur.fetchone()
res = cur.fetchall()
res = cur.fetchmany(10)
print res[x][x]
cur.close()










