Python-??????α???????
???????????? ???????[ 2014/11/5 11:20:01 ] ????????????? ?α? Python
?????????????: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()
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11