Advertisement
businessdad

WooCommerce - Find duplicated base currency metadata

Jan 29th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.23 KB | None | 0 0
  1. -- Find all the order with duplicate meta data
  2. select
  3.     post_id
  4.     ,meta_key
  5.     ,count(meta_key) as value_count
  6. from
  7.     wp_postmeta
  8. where
  9.     (meta_key like '%_base_currency%')
  10. group by
  11.     post_id,
  12.     meta_key
  13. having 
  14.     value_count >= 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement