RE: [PHP-DB] Upload csv file into mysql

From: Date: Wed, 04 Sep 2002 08:36:21 +0000
Subject: RE: [PHP-DB] Upload csv file into mysql
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21558@lists.php.net to get a copy of this message
Hi this was very helpful to me, just now trying that what if i have TABLE (id_item, rate1, rate2, rate3, rate4) and CSV file like foll id_item,rate1,rate2 1,250,260 2,270,280 5,290,290 and what exactly mean \r in a TERMINATED BY? thx kaja S prátelským pozdravem Karel Príbramský AbiaNet, s.r.o.-----------------www.abianet.cz--- -----Original Message----- From: Ignatius Reilly [mailto:ignatius.reilly@free.fr] Sent: Wednesday, September 04, 2002 9:51 AM To: php-db@lists.php.net; Dr. Indera Subject: Re: [PHP-DB] Upload csv file into mysql Hi Dr, try: LOAD DATA INFILE "myfile.csv" INTO TABLE mytable FIELDS TERMINATED BY "," LINES TERMINATED BY "\r\n" ; of course, the structure of your CSV file must match exactly that of your table. hth ----- Original Message ----- From: "Dr. Indera" <dr.indera@verizon.net> To: <php-db@lists.php.net> Sent: Wednesday, September 04, 2002 6:20 AM Subject: [PHP-DB] Upload csv file into mysql > Hello, > > Is there a way to upload data in a csv file into a mysql table? > > Thanks > Indera > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#21558) next »