Importing data into MySql via PHP
| From: | Mark Roberts | Date: | Sun, 26 Oct 2003 17:41:15 +0000 |
| Subject: | Importing data into MySql via PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-167637@lists.php.net to get a copy of this message | ||
I haven't tried this before, but I need to now and wanted to get a couple of
pointers.
I have a client that maintains a MySql database on a webserver. They want to
import data into the database by uploading a Excel spreadsheet (most likely
saved in a .csv format). I want to import the data directly into the data
table via a php script. It appears that I should be using a LOAD DATA INFILE
command or a MYSQLIMPORT command.
From reading documentation, it would appear the the LOAD DATA INFILE is the
way I would have to go as MYSQLIMPORT appears to be a command line only
command.
I could use some pointers from someone who has used this before....such
as...
1. What is the default file format expected? (.csv?)
2. Any quarks I would need to know about?
3. Etc...
Thanks.
Mark Roberts, Roberts Computing Systems
Webmaster Services $29.50/mo
mailto:mark.roberts@robertscomputing.com