I have a MySQL database and am using PHP to interact with it. Would like to select data and extract the return set into a text/csv (or other) file that I can use in a mail merge, send to others in the org to mail merge, etc. Not sure if this is possible or where to being looking for the proper functions. If I can locate a sample I can figure it out -- someone shove me in the right direction?