load data

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

 



when using the 'load data infile' commands how do i force the data 
thats being loaded to completely be loaded

ie

LOAD DATA INFILE "data.txt" INTO TABLE datacontent.misc_code;

I have a file eg: data.txt thats 36 lines long, but is full of misc 
text including some php + mysql code, so its not poss for me to 
import the text saying that lines are terminated by "x" because 
the "x" could be in the code thats 'in the file'

my db table consisted of two tables

id, misc_code.   

id is autonumber, and i want to imort the 'whole' of a data.txt text 
file into the 'misc_code' field.

whats happening to me is that when i run the command 

LOAD DATA INFILE "data.txt" INTO TABLE datacontent.misc_code;

Its importing the file but its importing it into hundreds of rows, 
because the mysql is seeing the " / ; ' as seperate fields etc or 
rather as a new row for the misc_code table.

I cannot use a string replace with php into the text file because the 
text file content has to be kept exactly.

so how do i force the load data infile, to import the whole of the 
contents of the file into a single insertion from the first byte of 
the file to its eof,

Hope someone can help

Steven 


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux