Questions tagged as 'mysql'

1
answer

Not saved information in mysql when I click on one of the radioboxes of the form

I have a form with several text fields, radiobox, selectbox, and I want to save the information in the table of the bank that I use. But I'm having a problem when I click on the first two radios boxes , and I can only save when I cl...
asked by 06.09.2016 / 05:35
3
answers

Delete Report with months reset

I have a query in which I take monthly deposited values, it takes everything that it has in the base and shows the months that were inserted in the database. I would like to do different would like it to also show the months that did not have...
asked by 08.11.2016 / 16:19
1
answer

Using Inner Join Correctly and Adding Results

In my DB, I have 4 tables: Aluno , Ano , Matérias and Nota . They are mounted as follows: Tabela :: Colunas ---------------------------------------------------------- Aluno :: AlunoID | AlunoNome | AnoID...
asked by 04.09.2016 / 04:02
1
answer

Date with problem in mysql and java

I'm trying to use the date of a jYearChoser and a jMonthChoser to fetch the sale for a full month, I already tested it at the MySQL prompt and it worked perfectly with the command below: SELECT FORMAT(SUM(vendas.total_pagar),2), F...
asked by 01.09.2016 / 04:31
2
answers

Filter result by date

My problem is, when I execute the command below: SELECT Id_produto AS Produto, Quantidade AS quantidade, genius.vendas.data_venda AS Periodo FROM genius.itens_venda LEFT JOIN genius.vendas ON vendas.Id = Id_venda WHERE 'Id_produto' = 3418;...
asked by 25.08.2016 / 01:39
1
answer

Help for this query

Good afternoon Personal, I have these two tables that relate to know how many times a user has accessed the system: And I have this query: select nome_usuario, count(id_log) as qtde from logs as l left join usuario as u on l.usuario_l...
asked by 14.10.2016 / 22:38
3
answers

Error in declarations with Array

Well, I have an error that I can not find the solution. I have two hosting in the same place Hostgator, in a hosting my application is all right and working. But I needed to migrate the application to another address, in other words I migrated t...
asked by 09.08.2016 / 15:39
1
answer

Duplicate key in mysql

I'm in the third bimester of the database and we started using the insert in our database but I came across the error    "Error Code: 1022. Can not write; duplicate key in table '# sql-aa4_a". Is there a function that can solve this probl...
asked by 09.08.2016 / 03:44
1
answer

How to make a count in Mysql using the case or if?

I need to know how I can do a search in mysql to know how many documents I have to parse with a condition that if the previous process is not released it can not count. SELECT COUNT('num'), CASE WHEN ('pl_de_manutencao' = 'Liberado' |...
asked by 17.08.2016 / 20:37
1
answer

Optimizing a Mysql table with 40 fields

Hello everyone! I have a table in Mysql with 40 fields, it is a system of resumes. I'm optimizing both the table and the queries executed in PHP itself. The point is that to perform searches for specific profiles, 20 of these fields are used,...
asked by 17.08.2016 / 16:10