Posts by Alan Sousa • 1 point
4 posts
-
0
votes1
answer101
viewsA: Column not found using ALIAS in Laravel
I found the solution, in case someone find the same problem, or similar, I only changed some information in the query. Vendas::leftjoin('faturamento', 'faturamento.CodVenda','=','vendas.CodVenda')…
-
-2
votes1
answer101
viewsQ: Column not found using ALIAS in Laravel
I am in trouble when accessing a column in the Windows query Builder, the following code works in Sql Workbench. Vendas::selectRaw('if(faturamento.Codfaturamento is null, vendas.totalvenda,…
-
0
votes1
answer119
viewsA: Create query in query Builder - Standard
I managed to solve, it would have to be done with whereRaw, to bring the query I had done in SQL to Laravel. $total_hoje = Vendas::whereRaw('date(DataEmissao)=date(NOW())') ->whereIn('tipo',…
-
0
votes1
answer119
viewsQ: Create query in query Builder - Standard
I’m starting to work with Laravel and need to make a query in the database, is a simple query, but as I’m starting I do not know yet perform it. I need to get the sales done today, yesterday, this…