摘要:
pip install pymongo # 导入模块 from pymongo import MongoClient # 如果是本地连接host,port参数可以省略 # client = MongoClient() # 1.连接ubantu的mongodb客户端 client = MongoCli 阅读全文
posted @ 2020-11-12 22:23
hello_Ms_w
阅读(96)
评论(0)
推荐(0)
摘要:
# 1. 查询所有商品信息 def __fetch_all_info(self): cur = self.db_connect.cursor() sql_str = '''select * from goods''' cur.execute(sql_str) result = cur.fetchal 阅读全文
posted @ 2020-11-12 21:28
hello_Ms_w
阅读(150)
评论(0)
推荐(0)
摘要:
import pymysql # 创建连接对象 conn = pymysql.connect(host='localhost', port=3306, user='root', password='mysql',database='python', charset='utf8') # 获取游标对象 阅读全文
posted @ 2020-11-12 21:23
hello_Ms_w
阅读(5412)
评论(0)
推荐(0)
摘要:
import pymysql # 创建连接对象 conn = pymysql.connect(host='localhost', port=3306, user='root', password='mysql',database='python', charset='utf8') # 获取游标对象 阅读全文
posted @ 2020-11-12 21:21
hello_Ms_w
阅读(130)
评论(0)
推荐(0)
摘要:
from pymysql import connect def main(): find_name = input("请输入物品名称:") # 创建Connection连接 conn = connect(host='localhost',port=3306,user='root',password= 阅读全文
posted @ 2020-11-12 21:20
hello_Ms_w
阅读(126)
评论(0)
推荐(0)

浙公网安备 33010602011771号