Re: From TXT to a mySQL db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 18, 2007, at 3:15 PM, Marcelo Wolfgang wrote:

This looks good, but since the db server is in a hosting company it will be possible to read from a .txt ?

also I have never seen the LOAD DATA command, so I'm testing here and having problems ... can anyone spot what's wrong on this query ?

$SQL = "LOAD DATA INFILE 'test.txt' INTO TABLE test FIELDS TERMINATED BY '^' LINES STARTING BY '20'";
$Query = mysql_query($SQL);

TIA
Marcelo Wolfgang

I'm not sure about the issue with the query... I've only used it a few times, although I will be using it today with a csv file so I'll let you know if I find anything :)

As far as if the hosting company will let you put the file and read it from their account I'm not sure, that would be a decision that they made, actually I'm not positive that there is anyway they can stop it...

But if they don't want to let you do it that way.. Would they allow you to place a mysql database on their server that they didn't create? You said you were testing locally, so why not simply do the load file, and then transfer a complete table up to the hosting company?



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux