Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sabai Report Directory Export Report (Camp Finder)
SELECT t1.entity_id, t2.post_id, t2.post_title, t1.value, t3.address, t3.street,, t3.state,,,, t4.fax,,, DATE_FORMAT(FROM_UNIXTIME(t5.edited_at), "%Y-%m-%d")
FROM wp_sabai_entity_field_content_body as t1
LEFT JOIN wp_sabai_content_post as t2
ON t1.entity_id = t2.post_id
LEFT JOIN wp_sabai_entity_field_directory_location as t3
ON t1.entity_id = t3.entity_id
LEFT JOIN wp_sabai_entity_field_directory_contact as t4
ON t1.entity_id = t4.entity_id
LEFT JOIN wp_sabai_entity_field_content_activity as t5
ON t1.entity_id = t5.entity_id
WHERE t2.post_entity_bundle_name = 'campfinder_listing'
AND t2.post_status = 'published'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment