#conding=utf-8 """ #第一次尝试写sql author=wanggang data:Jan,8,2020 #功能实现常见的增删改查 """ # from Src import GetMySQLConnection # Connection=GetMySQLConnection('localhost' , 'root' , 'root' , 'firsttry',3306) # cur=Connection.selectDb() from Src.GetMySQLConnection import GetMySQLConnection connection=GetMySQLConnection('localhost' , 'root' , '' , 'firsttable',3306)#firsttable是表名 data_list=connection.selectDb("select * from tp_test") print(data_list) print("成功啦")
python连接数据库demo
最新推荐文章于 2022-11-17 15:07:00 发布