Questions tagged as 'mysql'

1
answer

"No suitable driver found" in Java database connection

Well, I use eclipse and I'm trying to connect to a MySQL database with my project, my code, compared to other tutorials I found, is perfect, and that's it: package pack; import java.sql.*; import javax.swing.JOptionPane; public class Banco...
asked by 10.06.2014 / 01:49
1
answer

Problem reading database words with accent or cedilla

I'm reading my table database categories and when I have words with cedilla or accents, they appear in my project with strange characters. For example, in the categories I have a Ratings title, in my project this title appears as: AVALIA...
asked by 07.06.2014 / 20:58
1
answer

MySQL Commands out of sync; you can not run this command now

I have a class Import (PHP) that serves to read XML files and to insert into the DB. First of all I have the constructor of class Import that creates a new connection mysqli : ... $this->mysqli = new mysqli( HOST, USE...
asked by 19.05.2014 / 15:26
1
answer

How do I create a mysql trigger to drop inventory?

First of all I will present the structure of the database: Orders Table: id cliente data status Items table: id produto tamanho = Estoque.id quantidade pedido = Pedidos.id Inventory table id tamanho quantidade chave = Produto.id...
asked by 27.06.2014 / 22:06
3
answers

How to compare MySQL with an array?

I have to make a MySQL comparison with an array of numbers. For example: I have array of integers asm: $inteiros = array(); And I have to return the ids of my class table with this array , like this: SELECT *...
asked by 10.10.2016 / 14:47
1
answer

Inner join between two tables

I tried it like this but it's wrong SELECT * FROM produto INNER JOIN familiaproduto ON familiaproduto.idfamiliaproduto = produto.idNomeProduto INNER JOIN qualitygate ON (qualitygate.idQualityGate = produto.idQualityGate1 and qualitygate...
asked by 13.10.2014 / 14:59
3
answers

Select Where IN all records

Sirs, I've been looking for days to answer this question, which I think is silly, but I could not. I created a view that brings registration | Name | Title | Turn | About Us | CodTreina | Status I made this select: SELECT * FROM vw_tr...
asked by 08.05.2017 / 20:28
2
answers

How to perform insert or update of a JSON object

JSON object $postdata : { "0": { "codigo": "1", "descricao": "Bobina", "preco": "10.0000" }, "1": { "codigo": "2", "descricao": "Capa", "preco": "20.0000" } } Using MySQL...
asked by 14.02.2017 / 18:43
1
answer

How to make an appointment to get the dates according to the weekdays?

How to make a particular query in MYSQL by picking the dates according to the day of the week? For example: +-------+---------------------+ | id | created_at | +-------+---------------------+ | 49185 | 2015-02-19 02:35:10 | | 49...
asked by 07.06.2017 / 20:25
2
answers

Difference between two dates with time greater than 24h?

I have the following query: SQLFiddle It's past 24h, it clears time and starts counting again. I need to make the difference between the hours, counting that they have to go beyond 24h. For example, on the first line of the result...
asked by 05.09.2018 / 16:34