All for Joomla All for Webmasters

Exercise Category – Balance




posts wposts
LEFT JOIN $wpdb->postmeta wpostmeta ON wposts.ID = wpostmeta.post_id
LEFT JOIN $wpdb->term_relationships ON (wposts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
WHERE wpostmeta.meta_key = ‘exercise’
AND wpostmeta.meta_value >= CURDATE()
AND $wpdb->term_taxonomy.taxonomy = ‘skill_categories’
AND $wpdb->term_taxonomy.term_id IN(‘Balance’)
ORDER BY wpostmeta.meta_value ASC
LIMIT 4
“;
?>