mysql - LOAD DATA LOCAL INFILE with PHP no data imported -
what seek accomplish export info excel 2013 , upload info remote server. info kept in excel , refreshed weekly. utilize mysql 5.x , php 5.3.x , work on windows 7 scheme development environment using wamp. did lot of research in net not solve problem.
this table:
$query = "create table if not exists `t0` ( `id` int not null auto_increment , `fromport` char(10) not null , `kabatas` int null , `eminonu` int null , `bostanci` int null , `maltepe` int null , `kartal` int null , `buyukada` int null , `heybeliada` int null , `burgazada` int null , `kinaliada` int null , `sedefadasi` int null , `fromtime` char(10) null , `fromtype` varchar(50) null , `company` varchar(50) null , `duration` char(10) null , `price` float null , primary key (`id`) ) ;";
this php part load data:
$query = 'load info local infile "c:/transportation/' . $filename . '.txt" table ' . $filename . ' lines terminated "\r\n" ignore 1 lines;'; $result = mysqli_query($db, $query);
the test info is:
no fromport kabatas eminonu bostanci maltepe kartal buyukada heybeliada burgazada kinaliada sedefadasi fromtime fromtype company duration
price kabataŞ 1 08:30 vapur İdo 01:30 5.00 tl kabataŞ 1 09:30 vapur İdo 01:30 5.00 tl kabataŞ 1 13:00 vapur İdo 01:30 5.00 tl kabataŞ 1 15:00 vapur İdo 01:30 5.00 tl kabataŞ 1 19:00 vapur İdo 01:30 5.00 tl
now:
there no errors there no info in table result (checking mysql workbench) lines , cr+lf, info delimited tab (checked notepad++)
any thoughts? give thanks in advance
php mysql
No comments:
Post a Comment