数据库
言希0127
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mysql python
#coding=utf-8 import MySQLdb con = MySQLdb.connect(host='127.0.0.1',user='root',passwd='2',db='nan',port=3306) cur = con.cursor() cur.execute('CREATE TABLE IF NOT EXISTS tableone (id int not null a...原创 2018-09-15 21:51:18 · 211 阅读 · 0 评论 -
python 数据库 mongodb
#coding=utf-8 import pymongo #print pymongo.__version__ client = pymongo.MongoClient(host='127.0.0.1',port=27017) db = client.test collection = db.students student = { 'id':'20170905', 'nam...原创 2018-09-16 10:16:41 · 270 阅读 · 0 评论 -
数据库 (一) sqlite3
#coding=utf-8 import sqlite3 import sys reload(sys) sys.setdefaultencoding('utf-8') con = sqlite3.connect('/home/flyvideo/sqlite3database.db') con.text_factory = str # 插入的字符串中含有中文字符,得加这一行 con.execut...原创 2018-09-15 09:45:51 · 233 阅读 · 0 评论
分享