资源简介

代码片段和文件信息
#!/usr/bin/env python
import pymysql #Python3
db = pymysql.connect(“localhost““sips““root““zaijian“ )
cursor = db.cursor()
cursor.execute(“SELECT VERSION()“)
data = cursor.fetchone()
print (“Database version : %s “ % data)
db.close()
def create_table():
db = pymysql.connect(“localhost““sips““root““zaijian“ )
cursor = db.cursor()
cursor.execute(“DROP TABLE IF EXISTS EMPLOYEE“)
sql = “““CREATE TABLE EMPLOYEE (
FIRST_NAME CHAR(20) NOT NULL
LAST_NAME CHAR(20)
AGE INT
SEX CHAR(1)
INCOME FLOAT )“““
cursor.execute(sql)
db.close()
def db_insert():
db = pymysql.connect(“localhost““sips““root““zaijian“ )
cursor = db.cursor()
sql = “““INSERT INTO EMPLOYEE(FIRST_NAME
LAST_NAME AGE SEX INCOME)
VALUES (‘Mac‘ ‘Mohan‘ 20 ‘M‘ 2000)“““
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\
文件 1157 2018-03-21 01:14 Smart-IoT-Planting-System-master\.gitignore
文件 1063 2018-03-21 01:14 Smart-IoT-Planting-System-master\LICENSE
文件 1890 2018-03-21 01:14 Smart-IoT-Planting-System-master\README.md
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\
文件 150608 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\Hardware-kit-1.jpg
文件 135863 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\Hardware-kit-2.jpg
文件 32 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\README.md
文件 33075 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\arch-diagram.png
文件 80509 2018-03-21 01:14 Smart-IoT-Planting-System-master\arch\environment.png
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\
文件 1688 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\README.md
文件 932 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\databa
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\db\
文件 932 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\db\db.py
文件 59 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\db\db_init.sh
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\deploy\
文件 222 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\deploy\README.md
文件 610 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\deploy\cloud_deploy.sh
文件 44 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\echarts-python.py
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\mqtt_server\
文件 192 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\mqtt_server\REAMDE.md
文件 55 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\mqtt_server\hbmqtt_server.sh
文件 726 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\mqtt_server\pub.py
文件 835 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\mqtt_server\sub.py
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\
文件 393 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\README.md
目录 0 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\sips\
文件 86 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\sips\db_init.sh
文件 48 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\sips\deploy.sh
文件 802 2018-03-21 01:14 Smart-IoT-Planting-System-master\cloud\platform\sips\manage.py
............此处省略88个文件信息
相关资源
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
- Python Machine Learning Case Studies
- python获取硬件信息
评论
共有 条评论