zhangyong 3 months ago
parent
commit
09e8b70524
1 changed files with 2 additions and 2 deletions
  1. 2 2
      common/sql_help.py

+ 2 - 2
common/sql_help.py

@@ -25,7 +25,7 @@ class sqlCollect():
     def insert_pj_video_data(cls, user_video_id: str, channel: str):
         current_time = datetime.now()
         formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
-        insert_sql = f"""INSERT INTO pj_video_data (task_name, mark_name,user_video_id,channel,data_time) values ("{user_video_id}", "{channel}", "{user_video_id}", "{channel}", '{formatted_time}')"""
+        insert_sql = f"""INSERT INTO pj_video_data (task_name, mark_name,used_video_id,channel,data_time) values ("{user_video_id}", "{channel}", "{user_video_id}", "{channel}", '{formatted_time}')"""
         MysqlHelper.update_values(
             sql=insert_sql
         )
@@ -35,7 +35,7 @@ class sqlCollect():
         """
         从数据库表中读取 id
         """
-        sql = f"""select user_video_id from pj_video_data where user_video_id = %s limit 1"""
+        sql = f"""select user_video_id from pj_video_data where used_video_id = %s limit 1"""
         data = MysqlHelper.get_values(sql, (user_video_id,))
         if data:
             return True