You running Windows or *nix?  File permissions will play a part in this, 
but use PHP's exec() function to execute MySQL's load data infile. The 
manual has a number of well annotated examples. The big problem may be that 
you'll be executing the command as whatever user the web server is running as.

But before you start reinventing the wheel,  search for "MySQL import csv 
PHP", or something similar, and check out the script sites referred to in 
the links part of the manual. This isn't a new problem and has been 
addressed before.

HTH - Miles Thompson


At 09:13 PM 1/19/2002 +0000, rop30999 wrote:
>I have a called file cats.txt which count data that were solitary of a DB
>Access.
>I need to export these data for a table 'cats' inside of a DB done in MySql.
>
>In MySql I can execute this procedure in the following way:
>
>Load data local infile "gatos.txt"
>into table gatos
>fields
>terminated by ','
>enclosed by '"'
>(Id, Nome, Raça);
>
>I need to know how I can accomplish this same operation but using PHP
>
>Thank you
>
>Paulo
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to