Let's suppose there is a set of A and for each a of A there is a set of B. In short: A:B = 1:n
Let's suppose, there is an a, which is an A and it is interesting. However, I would like to select a with all its B elements.
For instance, let's consider the example of Companies and Workers. For the sake of simplicity, we assume that a Worker works at a single Company and a Company might have a natural number of Workers.
If I want to select a set, containing the values of Company.Name, Worker.Name of a given Company, then what should I do in PHP, to achieve the expected result?