Questions tagged as 'mysql'

1
answer

Query MySql confusing results

I have to do a mysql query through a Java method. This is the sql I did to test if it works: select * from servicos S, clientes C, motores M where C.nome = "Claudio Fernando Pires" group by ordemServico Theoretically it should bring...
asked by 25.10.2015 / 22:36
3
answers

Make an ORDER in MySQL from another TABLE

I wanted to know if it is possible for a mysql_query to search and ORDER it according to newer updates from another table for example .. I have this query , when the user logs in to the chat he gives a list of all the registered use...
asked by 15.07.2015 / 15:27
1
answer

User control with permissions in PHP

Well, I've got a system developed in PHP with mysql database running and I've been given the task of creating user profiles or a tool for the system administrator to put what he wants the user to see, in java we have Spring security for this tas...
asked by 15.07.2015 / 04:47
1
answer

Error adding "0" to a tinyint (1) field in the database

In my database in the users table, I have a field called status, whose type is tinyint (1). If the status is "0" the user is activated (can access the site), if the status is "1", disabled. But when doing an INSERT and set the status="0" of the...
asked by 03.08.2017 / 00:38
1
answer

MySQL update event

I asked this question yesterday, I got the answer I wanted, I'll be direct and challenge: I have the query: UPDATE users SET time = time - 1 time is of type int and receives as default value 0 , in my PHP code I mad...
asked by 03.08.2017 / 07:35
1
answer

Is it possible to group a range of values?

I made the following query: 'select t.net, t.hora, t.'data', t.'local' from domingos t join( select net, updated, count(*) from domingos where 'data' = '07/05/2017' group by updated, net having count(*) > 4 ) as u on t.updated = u.updated a...
asked by 31.07.2017 / 19:46
1
answer

Elaborate table of the MySQL database

I have the following table in CSS: IneedtocreatetheMySQLdatabasetables,however,I'mnotsurehowtoworkthisout...Itwillonlybe"Updated" all the information in the table ... What worries me is the percentage bands ... How could I develop this? Do I...
asked by 28.09.2015 / 21:59
1
answer

Referencing collections in mongodb

I have a model of an airport in mysql and I plan to upload it to the mongodb via links between collections. In the following images are examples of documents from my collections. (airplane, airport and flight) The id in the flight is...
asked by 27.09.2015 / 17:31
2
answers

How to Change Query Arrays by Query Selects in MySQL

I'm not sure how to change arrays by query in sql, in that code below I have an array with records I would like to know how to exchange the array $tabela_modelo by a select in MySQL using the same columns of array: function get_marcas()...
asked by 04.09.2015 / 05:18
1
answer

Select count with union

Hello. I need to do a mysql query with 3 count on the same table. I got my results to appear one below the other, in the same column, but I need them to be in different columns. It's like this: I need to show the number of students enrolled i...
asked by 04.09.2015 / 19:57