Created
February 8, 2019 10:24
-
-
Save remcotolsma/8e0c31e82e0816e9883ebb1d8a7f94cf to your computer and use it in GitHub Desktop.
Tommy Booking Support WordPress posts accommodation ID's.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
wp_posts.ID, | |
wp_posts.post_title, | |
wp_postmeta.meta_value | |
FROM | |
wp_posts | |
LEFT JOIN | |
wp_postmeta | |
ON ( | |
wp_posts.ID = wp_postmeta.post_id | |
AND | |
wp_postmeta.meta_key = '_tbs_accommodation_id' | |
) | |
WHERE | |
wp_posts.post_type = 'camping' | |
AND | |
wp_posts.post_status = 'publish' | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment