C
CWDATA author
Hi fellow developers.
I have an Import Table set up to which I import CSV Data.
After each Import I want to "Insert" the Data into another table which has the same field names + some additional fields.
On each new import the sequence of events needs to be: -
- Delete records in Import Table
- Import the new records.
- Insert the new records into table 2.
I have successfully set up a "Delete records" in the "Before Import" Event but I need assistance in setting up the "Inserting" of records into the second table. I have tried this derived from reading forum but to no avail. I should say that I get no Error when running the Import but it simply fails to work. global $conn;
$strSQLInsert = "insert into _tblAgentCallData (bpn, subscr.ref, publication, publication_description, package_decription, addac_arrud,
sub_start_date, sub_end_date, date_last_issue_received, payment_method, sub_frequency, dd_frequency, last_payment_date,sub_rate, Title,
FirstName, Surname, Jobtitle, CompanyName, Address1, Address2, Address3, Address4, Postcode, CountryName, Telephone, Mobile, Email)
values ('".$values["bpn"]."','".$values["subscr.ref"]."','".$values["publication"]."','".$values["publication_description"]."','".$values["package_decription"]."'
,'".$values["addac_arrud"]."','".$values["sub_start_date"]."','".$values["sub_end_date"]."','".$values["date_last_issue_received"]."','".$values["payment_method"]."'
,'".$values["sub_frequency"]."','".$values["dd_frequency"]."','".$values["last_payment_date"]."','".$values["sub_rate"]."','".$values["Title"]."'
,'".$values["FirstName"]."','".$values["Surname"]."','".$values["Jobtitle"]."','".$values["CompanyName"]."','".$values["Address1"]."','".$values["Address2"]."'
,'".$values["Address3"]."','".$values["Address4"]."','".$values["Postcode"]."','".$values["CountryName"]."','".$values["Telephone"]."'
,'".$values["Mobile"]."','".$values["Email"]."')";
db_exec($strSQLInsert,$conn); return true; Any suggestions?
All the best,
Carl.
|
|