Im looking for a general solution for such queries:
SELECT * FROM A
LEFT JOIN B on A.ID = B.FK_ID
SELECT * FROM A
LEFT JOIN B on A.ID = B.FK_ID
LEFT JOIN C on B.ID = C.FK_ID
to have it in an array, so joined records would be in a nested arrays. It's very complicated isn't it? All I have is the query and fetched all records
EDIT:
it normally would return
A.col1 A.col2 A.col3 B.col1 B.col2 B.col3
if A has 4 rows and 2 records of B connects to A, A will have 5 lines. Instead, I want this:
A.col1 A.col2 A.col3 B (array)