将文本文件导入mysql
问题描述:
I have a text file, one "thing" on each line.
I also have a mysql table: id (auto increment) thing (varchar)
I want to get the text from the textfile into mysql. What is the best way to do this?
I thought about making it into an array in php and adding it through that into the mysql but is there an easier way?
edit: the file has 50,000 lines.
我有一个文本文件,每行一个“东西”。 p>
我还有一个mysql表: id(自动增量) thing(varchar) p>
我想将文本文件中的文本转换为mysql。 这样做的最佳方法是什么? p>
我想在php中将它变成一个数组并通过它添加到mysql中但是有更简单的方法吗? p> \ n
编辑:文件有50,000行。 p> div>