Not the correct place maybe but hope someone knows how to do this I have a csv file (in txt) and it is a datafeed and want to input it into my database but the file is not good formatted. The description is over several lines and when I use navicat or the normal import function it sees every new line as a new record. I need somthing to eliminate the newlines that are not correct and make it so only every new record is on a new line. Normally I would do it by hand but this file is over 65000 lines long Hope this makes sence and someone can help me. Edwin
I would start off by trying to use excel to format it. If this fails then upload it to your server and use the fopen function to go through it line by line and alter the positions of the linebreaks. Have you tried uploading it with phpmyadmin? That normally handles most things.
phpmyadmin doesn't work and line by line with over 65,000 lines is a bit ... what I have is a file that looks like this id;title;link;description;price;offerid;image;category;Einde; "3";"GEMEY MAYBELLINE MASCARA • Ook in waterproof. <a href=""url"">Klik hier voor kleurcodes</a> EANCODE: 5021044013332";"10.99";"06503-001";"http://www.drogisterij.net/producten/afbeelding/06503-001.jpg"; "Ricils Volum'Express";"####""; "4";etc etc Code (markup): I almost think it is best to put it all on 1 line and try to figure out how to make a php function that will aalk thru the line and break it every 9th ; it comes across