Forum Moderators: coopster

Message Too Old, No Replies

Importing text into a mysql database

         

madmatt69

1:26 am on Oct 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all,

I've got a text file with a number of variables in it, for example "date = Oct 14 2007" "title = This is the text file"

And I'd like to get those variables into a particular database table, for example the table name is "posts" and then put the text file's title variable into the "title" field of the "posts" table.

I know this has to be easy, but I keep running into issues. I'm a total novice when it comes to programming.

Can anyone point me in the right direction?
Thanks!

jatar_k

7:07 pm on Oct 15, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could try using mysql's LOAD DATA [dev.mysql.com]

or you could write some code if that doesn't work, this thread should get you started
Basics of extracting data from CSV files [webmasterworld.com]