Select in two fields of a table

0

Hello, I'm having a problem and I'd like to ask for help from you. It is as follows:

I'm integrating a PHP system into the Wordpress Woocommerce plugin and I need to order some products from the database, so far so good. The problem starts when fetching the product from the table. She is like this

Order id              meta_key           value
1                     2                  3
2                     2                  87
3                     3                  45

I need to select id 1 that contains value 3 as long as id 2 contains the value 87. How do I do this? I'm completely lost.

    
asked by anonymous 05.07.2017 / 19:43

0 answers