You are here: RE: [PHP] Uploaded CSV -> database « PHP « IT news, forums, messages
RE: [PHP] Uploaded CSV -> database

Posted by Jim Moseby on 10/07/30 11:29

> -----Original Message-----
> From: Brian Dunning [mailto:brian@briandunning.com]
> Sent: Monday, October 17, 2005 10:37 AM
> To: php-general@lists.php.net
> Subject: [PHP] Uploaded CSV -> database
>
>
> Does anyone have an example of code to process a CSV file submitted
> via a file upload and parse it out in order to write its
> records to a
> db?
>


With MYSQL (assuming permissions and such are in order) You would simply:

$sql="load data local infile '/path/to/csv' into table tablename fields
terminated by ','";


JM

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация