The statement exists in MySQL and as far as I know works perfectly.
I couldn't try it because my ISP had disabled it for security matters. But
it works as described on the MySQL manual .

HTH.

Jayme.

-----Mensagem Original-----
De: Miles Thompson <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 27 de fevereiro de 2001 19:58
Assunto: [PHP-DB] Anyone tried a MySQL load data infile statement?


> In the Python language, witht he appropriate module, one can construct a
> string like:
>
> "load data infile 'pwlist.txt' replace into table subscriber fields
> terminated by '\t' optionally enclosed by '"' lines terminated by '\r\n'
",
>
> pass it to the cursor.execute() function and it completes.
>
> I've tried this, assingning the string to $sql, and then issuing
> mysql_query( $sql ), all in the hope that magic would happen. It hasn't. I
> guess what I was sort of counting on was that mysql_query(), despite its
> name and obvious function might also be a general purpose execution tool
> for MySQL commands.
>
> Anyone tried anything similar? It's a really cool way to quickly update a
> database from a, in this case, tab-delimited file.
>
> Miles Thompson
>
>
> --
> 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