How can I do to return a query grouping by the name of the table using pdo, php and mysql?
For example I want to make a query and return a json equal to this one, using pdo, how?
{
"nome da tabela ": [{
"nome da coluna": "225",
"nome da coluna": "16",
}],
"outra tabela": [{
"nome da coluna": "226",
"nome da coluna": "16",
"nome da coluna": "95",
}, {
"nome da coluna": "226",
"nome da coluna": "16",
"nome da coluna": "99",
}]
}