I am using Nathan Pitman's Reports module to allow our client to export some custom information. I wrote up the SQL query and it works great. The only issue I have is that the first row (the header row) uses numbers for the column names, like shown here: http://cl.ly/image/3U2O451s1F3y I'd like to make those show as proper headers that make sense to the client. (For example: Member Group, Email, First Name, Company, etc.)
The Reports module does allow for post-processing but that is where I'm lost. I have no idea how to properly write the PHP to change the header row to what I need the column titles to be. I'd really appreciate some help here.
SELECT exp_member_groups.group_title as 'Member Group', exp_members.email as 'Email', exp_members.username as 'Username', exp_members.screen_name as 'Screen Name', exp_channel_data.field_id_13 as 'First Name', exp_channel_data.field_id_14 as 'Last Name', exp_channel_data.field_id_68 as 'OCB Member ID', exp_channel_data.field_id_59 as 'Company' FROM exp_channel_data JOIN exp_channel_titles ON exp_channel_data.entry_id = exp_channel_titles.entry_id JOIN exp_members ON exp_channel_titles.author_id = exp_members.member_id JOIN exp_member_groups ON exp_members.group_id = exp_member_groups.group_id WHERE exp_channel_data.channel_id = '6' AND exp_members.group_id = '11' OR exp_members.group_id = '10' OR exp_members.group_id = '9' OR exp_members.group_id = '8';