Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $querystr = ”
- SELECT $wpdb->posts.*, YEAR(post_date) AS year,
- MONTH(post_date) AS month,
- DAYOFMONTH(post_date) AS dayofmonth
- FROM $wpdb->posts, $wpdb->postmeta
- WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
- AND $wpdb->postmeta.meta_key = ‘epicredvote’
- AND $wpdb->posts.post_status = ‘publish’
- AND $wpdb->posts.post_type = ‘post’
- GROUP BY ID
- ORDER BY LEFT($wpdb->posts.post_date, 10) DESC, $wpdb->postmeta.meta_value+0 DESC
- “;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement