Commit 2b1f27ac by 岳巧源

add update attr

parent e0a0941a
Showing with 33 additions and 0 deletions
import pymysql
# 主要用于从 lie_shop_class 表中获取到class_id 后,将对应的属性和拓展属性 写入lie_shop_attr表(或者它的copy表)。
def get_class_ids():
db = pymysql.connect(host='192.168.1.238', port=3306, user='liexin_data_distribution',
password='liexin_data_distribution#zsyM', database='liexin_data_distribution')
query_sql = "select distinct class_id from lie_shop_class"
cursor = db.cursor()
cursor.execute(query=query_sql)
results = cursor.fetchall()
data = []
for i in range(len(results)):
data.append(results[i][0])
cursor.close()
db.close()
return data
def insert_attr():
db = pymysql.connect(host='192.168.1.238', port=3306, user='liexin_data_distribution',
password='liexin_data_distribution#zsyM', database='liexin_data_distribution')
def get_attr():
pass
def get_ext_attr():
pass
if __name__ == '__main__':
pass
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment