Questions tagged as 'mysql'

1
answer

Query MySQL three tables

I'm trying to make an query in the MYSQL database, but the query is not coming back what I wanted. I want to make a query where I return all modules and modules that the company has with the where clause in Empresa_ID . MySQL Att...
asked by 08.06.2018 / 16:34
2
answers

How to put a php variable in a mysql query?

For example: $query = "INSERT INTO tabela (data, assunto, destino, elaborado) VALUES('{$data}', '{$assunto}', '{$destino}', '{$elaborado}')"; Where is tabela , I want to put a variable in place, because depending on what the user choo...
asked by 21.06.2018 / 00:16
3
answers

Mysql query error

Hello! Why is the status coming different from the table? follow my query: SELECT DISTINCT max(idEmbreagem) as idEmbreagem, b.prefixo as idVeiculo, max(datamontagem) as datamontagem, max(kmmontagem) as kmmontagem, max(horime...
asked by 24.06.2018 / 05:52
1
answer

MYSQL PHP query bring results of Today and This Week

I'm setting up a CRM type, where it does the queries in MYSQL with PHP to bring the appointments I have today, this week and all others. I'd like you to bring something like this: Hoje: compromisso A compromisso B Essa semana: compromisso...
asked by 30.07.2018 / 19:42
1
answer

How to get information that is in 2 tables mysql [duplicate]

Table 01: $file Table 02: $users I want to do so, when a user for level ID = 30 displays a msg EXAMPLE, FILE 01 ( $file->userid = 20 that is, this user id is in table 02, $users->id ) TABLE $ FILE...
asked by 31.07.2018 / 00:53
1
answer

Select with group by double

In MySQL I have a table named contact_status : id | id_contato | detalhamento_id 1 | 1 | 2 2 | 1 | 3 3 | 2 | 4 4 | 2 | 2 5 | 2 | 1 6 | 3 | 2 7 |...
asked by 10.07.2018 / 14:58
1
answer

How to make a relationship between 5 tables?

I have the following tables: conteúdo , aulas , curso , turma , grupo_User where the logic will be as follows: A content can belong to several classes, as a lesson can have several contents A class can belong...
asked by 11.07.2018 / 19:36
1
answer

I need explanations of OUT and PL / SQL INOUT and Mysql procedure

Well, I put PL / SQL and mysql because these two modes have procedures in both Oracle and mysql, but anyway. The IN mode I understood that it works like a constant, it is passed through the parameter and can not be changed inside the procedure ....
asked by 10.07.2018 / 21:07
2
answers

How to create sum row at the end of table

I have a page with a table that shows information on the amount of items planned to be performed and the number of items actually made at the end of each month. If the amount of predicted items is greater than that of items made the cell turn...
asked by 13.07.2018 / 14:27
1
answer

How do I retrieve the current date of a MySQL database on Arduino?

I am connecting to database mysql using arduino next to esp8266, wanted to know how to get current date store in a variable and then send it to the bank. I'm having trouble just getting the current date.     
asked by 20.06.2018 / 02:58