Is Load-Data possible in mssql?

-----Original Message-----
From: Chris Boget [mailto:chris@;]
Sent: Thursday, November 07, 2002 2:48 PM
Cc: kristina; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] [Newbie Q] csv file upload via php to mysql

> Basically, you would have to receive a CSV data to then pass it to the
> mysql via command prompt, just as if you would do it via shell. You
> should be using mysqlimport in shell. So, in PHP you'd get to use system
> command to accomplish this all automatically. Be aware of some security
> issues.

Actually, you don't even need to do that.
Since you are uploading the file via PHP, PHP has the relevant information
regarding that file.  Particularly, where it's located.  Using that, you can just
do a LOAD DATA INFILE query in mySQL.  You can find more information
about there here:

I'm doing exactly what you are - accepting a csv file as upload - and I'm 
using the above query command to get it into the DB.  It's been working
for me for the last 2 years. :p



PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to