Re: From TXT to a mySQL db

From: Date: Fri, 19 Oct 2007 12:13:44 +0000
Subject: Re: From TXT to a mySQL db
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-263373@lists.php.net to get a copy of this message
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@raoset.com

« previous php.general (#263373) next »