Advertisement
emcniece

Max Price for WordPress Custom Meta Field

May 15th, 2013
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. SELECT max( cast( meta_value as unsigned) )
  2. FROM wp_postmeta
  3. LEFT JOIN wp_posts ON wp_posts.ID=wp_postmeta.post_id
  4. WHERE meta_key='price'
  5. AND post_status='publish'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement