/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$myrows = $wpdb->get_results(" SELECT wposts.post_title, wposts.ID FROM $wpdb->posts wposts 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) LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) LEFT JOIN $wpdb->postmeta ON(wposts.ID = $wpdb->postmeta.post_id) WHERE wposts.post_status = 'publish' AND wposts.post_type = 'concerts' AND $wpdb->postmeta.meta_key = 'DateConcert' AND $wpdb->term_taxonomy.taxonomy = 'Genres' AND $wpdb->terms.slug = 'Jazz' ORDER BY CAST($wpdb->postmeta.meta_value AS DATE) ASC ");
URL: http://www.kune-studio.com