Questions tagged as 'query'

0
answers

Parameter query sql

I have the following function and would like to use the following parameter method public function graficos( Request $request ){ $id = $request->input('id'); $query = "SELECT * FROM tabela WHERE id = :id OR id = (SELECT...
asked by 25.06.2018 / 21:56
4
answers

Select with columns reporting incorrect data

Hello I have one more problem regarding a search in the database. I want to make a SELECT that searches for information such as company code, social reason, year and values (summed). At first, the search for information without the company na...
asked by 08.06.2018 / 15:38
1
answer

Query data from two different tables and list without joining data

I am developing cash flow from my company and am encountering a difficulty. I have two different tables. A table is tb_compras (id, nfe, value, date) and then I have another one also tb_compras_pagamentos (id, buy_id, pay_value, date). I n...
asked by 08.06.2018 / 15:10
0
answers

Fatal error when executing the query

I'm trying to do a while but I can not do it at all. You are returning the error below:    Fatal error: Call to a member function query () on null in /home2/techlogu/public_html/index.php on line 697 My code looks like this: <?php $...
asked by 21.06.2018 / 05:25
0
answers

Comparing three column records in a mysql table

I make a query in COL1 which has the total of rows and then I make a query in COL2, but it is less than COL1. How do I get COL2 to return the IDs that are the same as COL1 so that they are side by side according to the ID of COL1 so I can see wh...
asked by 31.05.2018 / 16:06
1
answer

Isnull get the next SQL condition

How can I do it on SQL server a condition if the return of a field is null and it returns another condition ISNULL( CONVERT(CHAR(08),C.PEDS_DAT_FAT,112), d.NFFE_DAT_ENT) BETWEEN '20180501' AND '20180530') I'm not sure what to do, b...
asked by 07.06.2018 / 22:59
1
answer

JSON in Laravel

I would like to know how to send the query data in json through the controller and how the view should receive them. Controller: $dados = $req->all(); $query = ""; if($dados['filter'] == 1) { $query = User::where('id','LIKE','%'.$da...
asked by 29.05.2018 / 16:04
1
answer

How can I get information using laravel with chained join?

I have 3 layers of entities, of which I only want the third object. but based on information from the first two. For example, I have a factory that makes cars, and each car has a type of wheel. I want all the wheels manufactured by a factory....
asked by 01.06.2018 / 13:19
2
answers

Select data from three SQL tables

I'm trying to merge data from three tables using this sql: SELECT cod_nota, cupom, valor_contrato, valor_cadastro, data_emissao FROM cupons_nota, vendas, notas_fiscais WHERE cupons_nota.cupom = vendas.numero_nf AND notas_fiscais.cod_cliente='0...
asked by 24.05.2018 / 15:20
0
answers

Pentaho - pulling information from a site

Good morning guys, I'm using pentaho to pull information from various sites in the Brazilian state, I need to pull the information from this app here: # OpenForm & Seq = 1 > <form method="post" > action="/appls/legislacao/...
asked by 18.05.2018 / 16:58