ADODB problem [Load Data Infile not executing] SOLVED
Posted: Tue Feb 01, 2005 2:50 am
Hi
I am trying to execute a "LOAD DATA INFILE ..." query using an ADODB connection.
Here is the query that I am trying to execute:
This is what I echoed to the screen (I inserted the \n by hand, if you echo it to screen it obviously jumps to a new line).
If I run the query in command line or in phpmyadmin it works 100%.
Here is the execution point in my code:
$results equals NULL after execution, even if I intentionally put a syntax error in the SQL executed it still doesn't even throw an error. It is asif the ADODB doesn't even execute the query. Is it because the LOAD DATA INFILE syntax is not really a standard in SQL as a command to import data.
I am trying to execute a "LOAD DATA INFILE ..." query using an ADODB connection.
Here is the query that I am trying to execute:
Code: Select all
LOAD DATA INFILE 'C:\\xampp\\xampp\\htdocs\\localamp\\modules\\billing\\importedFiles\\discovery.csv' REPLACE INTO TABLE discovery FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY ' \n' (member_no,dependents_no,name_last,initials,inception_date,effective_date,plan_type_id,ceb,vit,pty,contribution,msa,ancil,premium,split_amount,total_amount)If I run the query in command line or in phpmyadmin it works 100%.
Here is the execution point in my code:
Code: Select all
$results = $connection->execute($sql);