need mysql select to see multiple meta_keys?
-
I can do this.
mysql> select * from wp_postmeta where post_id = ‘1304090’;
+———+———+——————-+————–+
| meta_id | post_id | meta_key | meta_value |
+———+———+——————-+————–+
| 4965987 | 1304090 | mp_tax_inclusive | 3 |
| 4965988 | 1304090 | mp_tax_shipping | 5 |
| 4965989 | 1304090 | mp_order_items | 1 |
| 4965985 | 1304090 | mp_shipping_tax | 0 |
+———+———+——————-+————–+I now want to find all post_id’s where meta_key “mp_tax_shipping” = 5 AND meta_key “mp_tax_inclusive” = 3. How can I specify both? I can specify one with:
“select * from wp_postmeta where meta_key = ‘mp_tax_shipping’ and meta_value = ‘5’” but I need both criteria met.thanks.
-
Sorry but you are in the wrong place. These forums are only for blogs/sites hosted by WordPress.com
WordPress.COM and WordPress.ORG are completely separate and different http://support.wordpress.com/com-vs-org/
And you should ask in the WordPress.org forums.
http://wordpress.org/support/
(or the Godaddy support)
If you don’t have a username on the ORG forums, you’ll need to register one there.Cheers.
-
- The topic ‘need mysql select to see multiple meta_keys?’ is closed to new replies.