0
我可以做到這一點。WordPress的選擇多個meta_keys?
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 |
+---------+---------+-------------------+--------------+
我現在想找到所有POST_ID的地方meta_key 「mp_tax_shipping」= 5,meta_key 「mp_tax_inclusive」= 3,我怎樣才能同時指定?我可以指定一個具有:
select * from wp_postmeta where meta_key = 'mp_tax_shipping' and meta_value = '5'
,但我需要兩個條件得到滿足。謝謝。
謝謝,那有效。 –