def METHOD_NAME(locations, first=None, last=None, force_update=False, load_email=True):
    # download and prepare data first
    qd = quidel.QuidelData(DATAPATH, load_email)
    if not qd.need_update and not force_update:
        print("Data not updated, nothing needs change.")
        return
    qd_data = qd.load_csv()
    qd_measurements = qd.prepare_measurements(qd_data, start_weekday=4)
    qd_ts = quidel.measurement_to_ts(qd_measurements, 7, startweek=first, endweek=last)
    # connect to the database
    u, p = secrets.db.epi
    cnx = mysql.connector.connect(user=u, password=p, database="epidata")
    cur = cnx.cursor()
    def get_num_rows():
        cur.execute("SELECT count(1) `num` FROM `quidel`")
        for (num,) in cur:
            pass
        return num
    # check from 4 weeks preceeding the last week with data through this week
    cur.execute("SELECT max(`epiweek`) `ew0`, yearweek(now(), 6) `ew1` FROM `quidel`")
    for (ew0, ew1) in cur:
        ew0 = 200401 if ew0 is None else flu.add_epiweeks(ew0, -4)
    ew0 = ew0 if first is None else first
    ew1 = ew1 if last is None else last
    print(f"Checking epiweeks between {int(ew0)} and {int(ew1)}...")
    # keep track of how many rows were added
    rows_before = get_num_rows()
    # check Quidel for new and/or revised data
    sql = """
    INSERT INTO
      `quidel` (`location`, `epiweek`, `value`)
    VALUES
      (%s, %s, %s)
    ON DUPLICATE KEY UPDATE
      `value` = %s
    """
    total_rows = 0
    for location in locations:
        if location not in qd_ts:
            continue
        ews = sorted(qd_ts[location].keys())
        num_missing = 0
        for ew in ews:
            v = qd_ts[location][ew]
            sql_data = (location, ew, v, v)
            cur.execute(sql, sql_data)
            total_rows += 1
            if v == 0:
                num_missing += 1
        if num_missing > 0:
            print(f" [{location}] missing {int(num_missing)}/{len(ews)} value(s)")
    # keep track of how many rows were added
    rows_after = get_num_rows()
    print(f"Inserted {int(rows_after - rows_before)}/{int(total_rows)} row(s)")
    # cleanup
    cur.close()
    cnx.commit()
    cnx.close()