Importing Informix data into MySQL

0

I'm developing an application based on data from an ERP. This ERP uses the INFORMIX database whose file export pattern is DELETED BY PIPES AND WITHOUT TEXT QUALIFICATION.

I want to create a query in INFORMIX and import it automatically to my application, which uses the MySQL database, periodically.

I created a php file to accomplish this task which I will trigger via crontab. But I can not import the file. I'm using the following code:

require_once("libraries/BD.class.php");
BD::conn();

LOAD DATA LOCAL INFILE 'ctplano.txt'
INTO TABLE ctplano
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
(id_plano, nroplano, contared, contadep, contades, descrconta, natureza, resultado, pedecgccpf, pedeccusto, ctafluxo, diario, ativo); 

But you are returning the message

  

Parse error: syntax error, unexpected 'DATA' (T_STRING) in D: \ xampp \ htdocs \ kurma \ imports \ import.php on line 6

    
asked by anonymous 14.09.2017 / 15:17

0 answers