$this->db->query("LOAD DATA LOCAL INFILE '".$file_path."'
INTO TABLE table1
CHARACTER SET utf8mb4
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
(Email,Jurisdiction_Parish,Jurisdiction_Ward,Jurisdiction_Precinct,Personal_FirstName,
Personal_MiddleName,Personal_LastName,Personal_NameSuffix,Residence_HouseNumber,Residence_HouseFraction,Residence_StreetDirection,
Residence_StreetName,Residence_ApartmentNumber,Residence_City,Residence_State,Residence_ZipCode5,Residence_ZipCode4,Mail_Address1,
Mail_Address2,Mail_City,Mail_State,Mail_ZipCode5,Mail_ZipCode4,Mail_Country,Personal_Sex,Personal_Race,Registration_PoliticalPartyCode,
Personal_Age,Registration_VoterStatus,Registration_Date,Registration_Number,Personal_Phone,LastVoted,Residence_WalkListOrder,
Favorability,Yard_Sign,Comments,Personal_NameOrder,voted,Rating,Custom_Variable1,Custom_Variable2,Custom_Variable3)
SET cid =".$cid.", csvsheet_id=".$csvsheet_id
);
Приведенный выше код для вставки данных CSV в базу данных, но я хочу обновить существующие записи базы данных из CSV.Итак, как я могу изменить запрос, чтобы он работал для ОБНОВЛЕНИЯ записей.