RE: [PHP] loading data into mysql from txt file from php
| From: | Don Read | Date: | Wed, 04 Jul 2001 07:08:51 +0000 |
| Subject: | RE: [PHP] loading data into mysql from txt file from php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56137@lists.php.net to get a copy of this message | ||
On 03-Jul-01 Clif Wieden wrote:
> I have a project where the admin uploads a new data file and it needs to
> be loaded into a mysql database. What's the best way to do this? The
> data file is tab-delimted but could be reformatted.
>
> Right now the file is uploaded and after copy($new_file, $file_loc)
> would like to refresh the db.
>
LOAD DATA INFILE 'filename' into da_table ...
the MySQL manual has the details.
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.