?????????????:MySQL??Oracle??SQLite
????????????Python?е???????????????SQLite????????e??SQLite??????????(???????????????? ????????????)???????????????????????????????
???????????DB-API?????????????????????????????????SGIС?飬???????????????μ???????DB-API??????????????????????????
????????Python??????MySQLdb???DB-API?? ?????connect()?? connect.cursor()?????...??????db?????????????????????????????????
????DB-API?淶??????:
????apilevel DB-API ??????? DB-API ?汾??
????threadsafety ?????????
????paramstyle ????????? SQL ?????????
????DB-API?淶?????:
????connect() ????????????????connect????????????????????o???????????????
????????connect???????????·???:
????#??ν???????????????????? ???????????
????close():????connect???? ???????????в???????????δ???????
????commit():???????????????????????????????????????commit?????????????????????
????rollback():??????????
????cursor():?????α?????
????????cursor?α????????????????????:
???????÷???:
????close():?????α????
????fetchone():???????????????
????fetchmany([size = cursor.arraysize]):???????????????
????fetchall():????????????μ???????
????excute(sql[?? args]):???????????????????
????excutemany(sql?? args):??ж???????????????
????????????:
????connection:???????α??????????????
????arraysize:???fetchmany()?????????????????????????1
????lastrowid:????PHP??last_inset_id()