Questions tagged as 'mysql'

1
answer

How to remove words between braces {} in the field in Mysql?

I have a table that contains a field with some values in braces, how do I exclude the chaves and the valores that are inside them? Example: cod | Movimento | 01 | Prazos {aguardando} | Prazos {aguardando}...
asked by 20.11.2017 / 11:39
1
answer

Viewing birthdays for the current month in FullCalendar

I have a database with a date in the field start , I would like to display only the birthday of the current month in fullcalendar , but I have two difficulties: Select only the birthdays of the current month Show birthdays i...
asked by 16.09.2016 / 20:46
1
answer

Doubt to bring data from mysql

I have the following question. Consider that I have the following sales data: Two states: São Paulo (Atibaia, São Paulo and Campinas) and Paraná (Londrina, Curitiba, Cascavel). | cidade | estado | vendas | |-----------|--------|--------|...
asked by 11.09.2016 / 20:06
1
answer

Pick up only the days of the current month

I have the query below where it is done on the current day, how could I make the same query in the current month until today, example: 01/09 13/09 but so that the query tomorrow is: 01/09 to 14/09 and so on. SELECT o.numero...
asked by 13.09.2016 / 23:49
2
answers

MYSQL - Using SUM with Join

I have 3 Tables Table Produtos with columns id , descricao , peso . Table op_itens with columns id_op , id_prod (chave estrangeira da tabela Produtos com a coluna id) , qtd . I want to...
asked by 11.07.2016 / 17:29
1
answer

How to calculate the distance between X and Y with points of Intersection

In the image above I have mapped the separation positions inside the warehouse where I work. I need to calculate the distance that the person who is separating goes through the warehouse. For example if the person is separating in position...
asked by 30.06.2016 / 14:59
1
answer

MySQL giving error only when I use query via variable

I'm trying to save an information in my database with the following functions: $sql = $request[0]; $query = $this->conn->prepare($sql); $query->execute(); $ sql var_dump: string(322) "INSERT INTO Fornecedor (razao_social, nome_fa...
asked by 08.07.2016 / 14:38
1
answer

How to get data from a JTable for storage in a database?

I'm developing a project called Menu List with a MySQL database and in Java on NetBeans, with an added library of MySQL-Connector-Java. I want the names of the selected products, the quantity of products, and the total price of the Cardapio.j...
asked by 07.06.2016 / 15:40
2
answers

Get records with more sorting in SQL

I have two tables: comentarios ---id ---comentario ---usuario ---supermercado ---avaliacao supermercado ---id ---nome ---endereco ---admin I want to take the average rating of each supermarket and take the 3 supermarkets with the highest a...
asked by 03.05.2016 / 21:05
1
answer

Update in a table with values from another

How to update the values of a table, using values taken from another table: UPDATE produto -- atualizar a tabela produto SET produto.quant = SUM(entrada.quant) -- produto.quant será igual a soma da coluna quant da tabela entrada WHERE pr...
asked by 16.03.2017 / 14:51