Answer the question
In order to leave comments, you need to log in
Is it possible to form a query so that the string contains an array?
Hello everyone, I came across such a task, you need to return an array of questions, and in each question an array with 5 answer options for it, the link by id is the question, question_id is the answer to it. These are two different tables, hence the question, Is it possible to assemble a query so that in the line of the array of questions there is a line with an array of its answers (maybe json can be stuffed there somehow with a subquery, or something else). Because for now I manage by reassembling the desired array with my own hands from the selected two, questions and answers, and still I drive back and forth in json, if I manage to get the desired array in one request, then 2 pages of code can be avoided ... do not tell me this possible at all?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question