David19801
David19801

Reputation: 11448

import text file into 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.

Upvotes: 0

Views: 687

Answers (1)

marto
marto

Reputation: 4493

see mysqlimport

Upvotes: 2

Related Questions