Great Dave !! Thanks. I will try asap
Last problem I got is that Address field has sometime a “,” before the Street number so it give me error. i.e. Street name , 10
When I use VALUES is it possible to insert a REPLACE ? Is it the sintax like that ?? Thanks
REPLACE ($rs[0][3], ‘,’ , ’ ')
This is a part of my array
CustomerID,CompanyName,ContactName,Address,City,Region,PostalCode,Country,Zona,Phone,Fax,Mobile,Email,SalesmanID,Id_anag C139,LAB. ANAL.MEDICHE FRANCO s.r.l.,“Via Soncin, 38”,PADOVA,PD,35122,IT,1,+39 049 8625966,0 049 8625967,AgGG,65 C084,SABER SRL,“Via Bravi, 51”,PONTE DI BRENTA,PD,35129,IT,1,+39 049 725511,AgGG,68 C074,DIAGNOSTICA RIVIERA SRL,“Via Bravi, 51”,PONTE DI BRENTA,PD,35129,IT,1,+39 049 725511,AgGG,69 C127,ISTITUTO FIGLIE S. CAMILLO,“Via dell’ Acqua Bullicante, 14”,ROMA,RM,00177,IT,1,+39 0422 428200,AgFB,71 C088,ISTITUTO DON CALABRIA,Bonfioli Arnaldo,“Via Don A. Sempreboni, 5”,NEGRAR,VR,37024,IT,1,+39 045 6013111,0 045 6013603,info@centrodoncalabria.it,AgGG,74
I did the code as you suggested here down
$sql_insert_into =“INSERT INTO eos_b2bc.customers (CustomerID,CompanyName,ContactName,Address,City,Region,PostalCode,Country,Zona,Phone,Fax,Mobile,Email,SalesmanID,Id_anag )
VALUES (”
. “’” . $rs[0][0] . “’,”
. “’” . $rs[0][1] . “’,”
. “’” . $rs[0][2] . “’,”
. “’” . $rs[0][3] . “’,”
. “’” . $rs[0][4] . “’,”
. “’” . $rs[0][5] . “’,”
. “’” . $rs[0][6] . “’,”
. “’” . $rs[0][7] . “’,”
. “’” . $rs[0][8] . “’,”
. “’” . $rs[0][9] . “’,”
. “’” . $rs[0][10] . “’,”
. “’” . $rs[0][11] . “’,”
. “’” . $rs[0][12] . “’,”
. “’” . $rs[0][13] . “’,”
. “’” . $rs[0][14] . “’,”
.")";
But it gives this Fatal error.
(odbc): SELECT CustomerID,CompanyName,ContactName,Address,City,Region,PostalCode,Country,Zona,Phone,Fax,Mobile,Email,SalesmanID,Id_anag FROM Q1_Customers Fatal error: Cannot use object of type ADORecordSet_array as array in C:\Program Files (x86)\Scriptcase\v8_new\wwwroot\scriptcase\app\B2B_B2C\Import_Customers\index.php on line 1078
The line 1078 is that one wiit <—
$sql_insert_into =“INSERT INTO eos_b2bc.customers (CustomerID,CompanyName,ContactName,Address,City,Region,PostalCode,Country,Zona,Phone,Fax,Mobile,Email,SalesmanID,Id_anag )
VALUES (”
. “’” . $this->rs[0][0] . “’,” <—
. “’” . $this->rs[0][1] . “’,”
. “’” . $this->rs[0][2] . “’,”
. “’” . $this->rs[0][3] . “’,”
. “’” . $this->rs[0][4] . “’,”
. “’” . $this->rs[0][5] . “’,”
. “’” . $this->rs[0][6] . “’,”
. “’” . $this->rs[0][7] . “’,”
. “’” . $this->rs[0][8] . “’,”
. “’” . $this->rs[0][9] . “’,”
. “’” . $this->rs[0][10] . “’,”
. “’” . $this->rs[0][11] . “’,”
. “’” . $this->rs[0][12] . “’,”
. “’” . $this->rs[0][13] . “’,”
. “’” . $this->rs[0][14] . “’,”
.")";