get_post_meta bringing back results, but $wpdb->postmeta doesn’t
Your SQL query is invalid regarding the WP database structure. wp_postmeta table has two columns that will help you here. meta_key : the name of your meta (post_lang in your case) meta_value : the value of your meta (en, es, …) Your SQL query should look like this instead. What changed is that you need … Read more