Skip to content

Instantly share code, notes, and snippets.

@codearachnid
Created January 8, 2019 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codearachnid/6671065b8ebddf3f32124f61adb239ea to your computer and use it in GitHub Desktop.
Save codearachnid/6671065b8ebddf3f32124f61adb239ea to your computer and use it in GitHub Desktop.
SELECT t1.entity_id, t2.post_id, t2.post_title, t1.value, t3.address, t3.street, t3.city, t3.state, t3.zip, t4.phone, t4.mobile, t4.fax, t4.email, t4.website
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
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