Hi folks,
I have a problem. I think it's the way I'm inputting data into MySQL table.
What I'm trying to do is insert data from a DOS text file into a MySQL
Table. The DOS text file has a country name on each line, like:
United Kingdom
United States
I'm trying to populate a MySQL table called Countries from the MySQL client
like:
LOAD DATA LOCAL INFILE "countries.txt" INTO TABLE Countries;
All the records are created but when I echo them to screen with PHP every
country has a space after it, like:
"United Kingdom "
What am I doing wrong? It's not my PHP code because if I create a table and
manually fill it with values the space isn't present. However, I don't want
to manually have to enter 290 odd countries into the table! So I'm assuming
it's the input file format or I'm missing something on the LOAD DATA
command? However, I have tried saving in every format present in Word (such
as Text Only, MS DOS Only, etc) but with no success.
The MySQL documentation says you can set the end of line marker explicitly
in the LOAD DATA statement. How do you do this?
Many thanks
James
--
PHP Windows 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]