Re: Importing a comma-delimited text file into a mysql database.
| From: | Richard Lynch | Date: | Thu, 28 Dec 2000 04:24:39 +0000 |
| Subject: | Re: Importing a comma-delimited text file into a mysql database. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32044@lists.php.net to get a copy of this message | ||
Search the PHP web-site for that builtin CSV-reading function in the file
System section :-)
----- Original Message -----
From: Ray Noel <rnoel@agn.net.au>
Newsgroups: php.general
Sent: Wednesday, December 27, 2000 9:33 AM
Subject: [PHP] Importing a comma-delimited text file into a mysql database.
> Hello to all,
>
> Is parsing a comma-delimited, text file that contains numeric and double
> quoted strings (that occasionally contain commas) easily done in PHP?
I've
> tried it in Perl but the commas in the text fields bring my poor attempt
> undone.
>
> Is it possible to / how would I use the text file header line (a list of
> the suppliers data variable names I think) as variable names in PHP? I
> want to be able to compare the header list with my list of data fields,
> determine how the data fields are ordered and initialize missing fields
> before updating my tables. Then I will have a fully automatic system that
> doesn't depend on the supplier data format remaining unchanged. Of
course
> if the supplier data field names are changed, it's back to the drawing
> board, but this is unlikely I hope. :-))
>
> TIA
> 2JRay
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>