Reputation: 641
I have mysql table called 'master'
CREATE TABLE `master` (
`id` int(7) NOT NULL AUTO_INCREMENT,
`destination` varchar(30) NOT NULL,
`bay` varchar(5) DEFAULT NULL,
`shipInvoiceNumber` varchar(20) NOT NULL,
`invoiceNumber` varchar(20) DEFAULT NULL,
`start` varchar(20) NOT NULL,
`end` varchar(20) NOT NULL,
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100113 DEFAULT CHARSET=latin1;
i have write a code using LOAD DATA INFILE.
mysql_query("LOAD DATA INFILE 'master.csv' INTO TABLE master fields terminated by ',' (destination,bay,shipInvoiceNumber,invoiceNumber,start,end);");
my 'master.csv' file
KANDY,Bay1,2011/331,5618,60842,60855
KANDY,Bay1,2011/331,5618,62493,62493
but it didnt import data in to database table.
any issue?
Upvotes: 0
Views: 1612
Reputation: 7504
It can be two causes without additional info about error:
Upvotes: 1