Dear all,
I’trying to use sc_exec_sql within a Php Type Button to execute the upload of a csv into a db table.
Just to learn how to do I’ve used a simple table .
My goal is to “append” new records coming from csv file into table. Here down the code and error.
Have you got idea how to solve it. Thanks Giovannino
sc_exec_sql("
LOAD DATA LOCAL INFILE ‘C:Tempwarehouse_sede.csv’
INSERT INTO
warehouse_sede
(codice, desbre, descri, name)
");
Errore
Errore durante l?accesso alla banca dati:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘INSERT INTO warehouse_sede (codice, desbre, descri, name)’ at line 1
LOAD DATA LOCAL INFILE ‘C:Tempwarehouse_sede.csv’ INSERT INTO warehouse_sede (codice, desbre, descri, name)
DB MySQL
TABLE warehouse_sede
fields
id-> autonumber
codice,
desbre,
descri,
name