Questions tagged as 'query'

1
answer

Check for list records in the entity framework

I have the following code: var ret = Monitoramento.List .Include(p => p.CD) .ThenInclude(p => p.CargaEntrega) .ThenInclude(p => p.CargaEntrega.Motorista) .ThenInclude(p => p.CargaEntr...
asked by 13.07.2017 / 16:50
2
answers

WP_Query complex

I'm putting together a calendar of events in Wordpress and I need to list all the events of the week grouped by the current day. I have events that last only one day and others that last the whole month. I created the custom post type "Events" a...
asked by 19.04.2017 / 18:26
1
answer

Conditional select that takes value from another table

I need to do a conditional select that checks a sum done this way: select round(sum(('gin'.'Caixa_9L' / 1000)),1) AS 'total' from 'gin' If this sum above is = 0, I need to get a value from one field in another table (called an asterisk) and...
asked by 07.04.2017 / 15:36
1
answer

How to get the current date minus two years in mysql?

I need to show in a query some items between the current date of the time in question and two years before.     
asked by 10.05.2017 / 20:38
1
answer

date field with order by direct in mysql displays a result and in php it comes out different

I'm trying to display a query ordered by the month of a field date , in phpmyadmin the query comes out right and when I display the result of the same query with php the date quit the correct order. query: "select calendario.id_ca...
asked by 08.02.2017 / 03:16
1
answer

Difference between hours without taking into account the date

Good evening, I have the following code: WITH CONSULTA AS ( SELECT V.CHAPA, V.DATA, MAX(V.BATIDA) AS MAXBATIDA, MIN(V.BATIDA) AS MINBATIDA FROM ARELBATIDATRANSITOVIEW AS V...
asked by 25.10.2016 / 00:30
1
answer

Handle an array key?

I need to manipulate a key that is passed as a parameter in this query : $Read->FullRead("SELECT DISTINCT ".DB_CONTAS." WHERE contas_status = 1 '{$FilterAdd} ", "{$FilterValues}");' The var_dump {...
asked by 04.01.2017 / 20:48
2
answers

SQL Select Where

Personal help please, I need to make a select in a table that contains ID, VALUE, DATE, NAME. The result has to bring only the lines where the date was the largest one. Example: ID VALOR DATA NOME 1 100 22/05/2...
asked by 22.05.2016 / 19:37
1
answer

Query with two tables

I'm in a project, I have the client and work table. A job has a customer. I have already listed the tables, but I need to do a select that from the client id in the work table, return the client name. I have to make a query to display in my c...
asked by 16.05.2016 / 18:18
1
answer

Using ElasticSearch, how to get data between a certain range of hours using range

Hello, I'm using ElasticSearch, and my query is not looking for the information I want. { "query": { "bool": { "must": [ { "range": {...
asked by 29.04.2016 / 15:13