Posts by Helio Soares Junior • 138 points
2 posts
-
2
votes1
answer94
viewsA: A single application with many databases
Just check this link: Using Multiple Database Connections You can get the connection as: $users = DB::connection('foo')->select(...); or $pdo = DB::connection()->getPdo();`…
-
0
votes3
answers153
viewsA: Get the sum of authors' books with Mysql
To return the price spent by each user would be like this SELECT usuario.nome, sum(l.preco) as totalGasto from usuario -- Juntar todas as compras do usuario inner join carrinho_de_compras cdp on…