Пример #1
0
 def mark_mid(self, base_mid):
     """
     Mark mid been used
     :param base_mid:
     :return:
     """
     mark_sql = f"UPDATE userinfo SET MARK=1 WHERE mid={base_mid}"
     MySQLDB.update(mark_sql)
Пример #2
0
 def update_user_info(self, user_info):
     """
     Update user's information to database
     :param user_info:
     :return:
     """
     user_sql = "UPDATE userinfo SET name=%s, sex=%s, face=%s, regtime=%s, sign=%s, birthday=%s, place=%s, current_level=%s, fans=%s, friends=%s, attention=%s, archive_count=%s, article_count=%s, mark=1 where mid=%s;"
     MySQLDB.update(user_sql, user_info)
Пример #3
0
    def aid_insert(aids, base_aid):
        """
        Insert video's aid to aid table and mark the aid been used
        :return:
        """
        aid_sql = "INSERT INTO aid(aid) VALUES ({});"
        MySQLDB.insert_many(aid_sql, aids)

        mark_sql = "UPDATE aid SET mark=1 where aid={};".format(base_aid)
        MySQLDB.update(mark_sql)