Make text files from database

matt89

Registered Member
Joined
Feb 4, 2011
Messages
64
Reaction score
4
Hi

I have a wordpress database. I already extracted some information from the database, so it looks like:

Post title,Post content
"Hello world","Hi my name is Matt"

Is there possibility to transfer each of the database line into a single text file?
Where text file name is Post title.
I would like to archive some of my articles.
 
SELECT `post_content`, `post_title` FROM `wp_posts`;

This query will return and array of all posts and their titles. Then you can do whatever you want with it, eg. use fwrite() to write it into separate files.
 
Back
Top