Re: load data infile problem

From: Date: Sat, 19 Jan 2002 22:07:37 +0000
Subject: Re: load data infile problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-16005@lists.php.net to get a copy of this message
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: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.db (#16005) next »