This is what I want to do, and I have no clue:
Submit a pre-defined query such as:
SELECT bodytext, headline FROM stories WHERE section LIKE 'Local' ORDER by id ASC Limit 4
And when it returns those fields for those 4 records, I want to write that data to one text file using fopen and fwrite.
Let me know what will work for this.