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]

Reply via email to