You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2024. It is now read-only.
When I get data of a parent table, I also need to get data of children with parentID. Currently, I do this action by two statements and store data in two arrays. Disvantage of this thing is when I use foreach(parent), I must call getNameByID to get the name of parentID. And foreach(children) also. Then assign name back to parent.
Question: Can we get data by one statement, and data of children will be stored as associated array in parent?
Like thtis:
When I get data of a parent table, I also need to get data of children with parentID. Currently, I do this action by two statements and store data in two arrays. Disvantage of this thing is when I use foreach(parent), I must call getNameByID to get the name of parentID. And foreach(children) also. Then assign name back to parent.
Question: Can we get data by one statement, and data of children will be stored as associated array in parent?
Like thtis:
And data will be returned:
RDBMS is relation of tables. So I think we usually get this issue.
The text was updated successfully, but these errors were encountered: