I've built an accessory to allow my client to export channel entry data to a CSV. All is working fine but they now want to add the entry status to the list of exported fields and I'm having trouble with the SQL. My select statement as it stands:
SELECT field_id_49 as 'First Name', field_id_50 as 'Last Name', field_id_51 as 'Email', field_id_56 as 'Date of Birth', field_id_53 as 'Occupation', field_id_52 as 'Gender', field_id_57 as 'Address', field_id_58 as 'Address 2', field_id_59 as 'City', field_id_60 as 'Postal Code', field_id_54 as 'Contact Number', field_id_55 as 'First Aid Qualification', field_id_61 as 'Payment Choice' FROM exp_channel_data WHERE channel_id = 13
I know I need to get the status from exp.channel.titles but I'm not sure how to join it all together. I just need to return a status no matter what it is.
Can any point me in the right direction?