I have two tables:
This is my posts
table:
+-----+----------------+-------------+
| ID | post_title | post_status |
+-----+----------------+-------------+
| 105 | Red Shirt | active |
| 106 | Green Shoes | active |
| 107 | Blue Hat | hidden |
+-----+----------------+-------------+
This is my meta
table:
+-----------+------+
| object_id | lang |
+-----------+------+
| 105 | en |
| 106 | fr |
| 107 | en |
+-----------+------+
I am trying to write an SQL query that returns the ID's of all the posts
with the post_status
of active
AND the lang
en
. With these two tables, there should only be one result (105
).
I am having trouble matching the ID
to object_id
. Any help would be really appreciated, thank you.