Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- We are only interested in months
- SELECT DISTINCT SUBSTR(meta_value, 6, 2)
- FROM wp_postmeta
- -- Where the event starts this year
- WHERE meta_key = '_EventStartDate'
- AND meta_value > '2012-01-01 00:00:00'
- AND meta_value < '2012-12-31 23:59:59'
- -- List them in ascending order
- ORDER BY `meta_value` ASC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement