Page 68 - Python Cơ Bản
P. 68
PMЖY 1ЦM TL϶R Xм GжE 8YTPI Gɹ XLВ Pɧ QШX 8YTPI OLɨG
LSІG Pɧ QШX (MGXMSREV] Xɽ] XLIS GɧM чІX Ю FЪG Pϴ]
GYVWSV <IQ TL϶R
fetchmany(size) RЀQ Ю KMоE OMВY JIXGL XVɱR Gɹ XLВ
UY] чКRL WР PвRK VS[ XVSRK QЦM P϶R JIXGL 2ЎY JIXGL
LЎX XLɳ XVϲ ZА 8YTPI VЦRK
ɇɹRK OЎX RРM
7EY OLM OЎX RРM Zɧ XVY] ZϴR XLɳ Gɹ XLВ чɹRK OЎX RРM XLIS Zɴ
Hд WEY
import MySQLdb
db = MySQLdb.connect(...)
db.close()
2KSɧM VE FϰR GˢRK RɱR чɹRK cursor OLM OLɺRK GɸR Wм
HдRK XLIS Zɴ Hд