sasori Posted August 24, 2008 Share Posted August 24, 2008 i have 3 tables - customer - order - orderitem inside customer table it has these columns -cust_id -fname -lname -street -city -state -zip -phone -fax -email then i created a customer.txt file and has contents like ,freddy,kruger,elm street,angels,CA,20204,000-000-000,,[email protected],,, ,albert,einstein,geek street,carlson,MA,23251,000-000-000,,[email protected],,, i placed this customer .txt file in my c:\wamp\www\webapp\ directory then i tried the command in my mysql console LOAD DATA INFILE "c\wamp\www\webapp\customer.txt" INTO TABLE "customer"; but it doesn't work at all, what should i to ? ??? i even tried to replace the double quotation mark with back ticks or replace the backslash into forward slash..and still it won't work. Link to comment https://forums.phpfreaks.com/topic/121069-solved-load-data-help/ Share on other sites More sharing options...
Hooker Posted August 24, 2008 Share Posted August 24, 2008 LOAD DATA LOCAL INFILE "c:\wamp\www\webapp\customer.txt" INTO TABLE "customer"; Link to comment https://forums.phpfreaks.com/topic/121069-solved-load-data-help/#findComment-624154 Share on other sites More sharing options...
sasori Posted August 24, 2008 Author Share Posted August 24, 2008 LOAD DATA LOCAL INFILE "c:\wamp\www\webapp\customer.txt" INTO TABLE "customer"; i found another way and it worked just fine LOAD DATA INFILE 'c:/wamp/www/webapp/customer.txt' INTO TABLE customer FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; thanks for the help Link to comment https://forums.phpfreaks.com/topic/121069-solved-load-data-help/#findComment-624155 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.