Firstly, sorry if this is the wrong section, maybe even the entirely wrong place for this. I am new to both phpmyadmin and sql and honestly have no idea, what category my problem best fits into and if it even belongs here at all.
I am trying to fetch all orders with a specific payment method from my database. This
SELECT `entity_id` FROM `sales_flat_order_payment` WHERE method = "cashondelivery"
will fetch the entity IDs of all relevant orders. Another column includes these entity IDs next to the actual order numbers. So I am trying to find a way to fetch all entries from this second column, whose entity ID is included in the list of entity IDs fetched in the first step. So basically I am looking for something like this:
SELECT `increment_id` FROM `sales_flat_order` WHERE entity_id = "<array of ids>"
Is something like that supported? Thank you in advance!