P
P
pwrchrd2017-09-08 01:48:34
PHP
pwrchrd, 2017-09-08 01:48:34

Is it possible to get a JSON response from SQL with nested child tables?

Decided to learn SQL, used MongoDB under NodeJS with ODM Mongoose. There it was possible to set the dependencies of the collections and, if necessary, pull them up for a specific field.
The result was something like this

{
    "user": {
        "username":"blablabla",
        "documents": [{...}, {...}] // собственно колекция которую можно подтянуть
    }
}

Is it possible to get something like this in SQL or is it already a task of the programming language?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey, 2019-05-20
@VladimirAndreev

well, do require with the right path and that's it .. :-)

E
Evgeny Nikolaev, 2019-05-20
@nikolaevevge

If your vendor folder is in the same directory as the executable script, then:
require_once("vendor/autoload.php");
then write use if necessary
Not an answer to the question, but if anyone needs to install composer on Centos 7 blog.ivru.net/?id=83

O
oh, 2017-09-08
@pwrchrd

like this?
https://docs.microsoft.com/en-us/sql/relational-da...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question