Questions tagged as 'mysql'

2
answers

Compare dates in sql

In my bank I have the field with datetime current_timestamp in the access table. I need to display the amount that each device accessed the site, whether computer, ios or android, each time one of them accesses, the corresponding field receives...
asked by 31.10.2018 / 15:37
1
answer

What time is it in bd

Hello, I'm a beginner programmer, and I'm developing a sales web app, where I need to insert the exact time of the sale into the bd, but I'm not getting it.    Code in javascript that generates time in real time: <script language="j...
asked by 22.12.2018 / 12:54
1
answer

Insert only if date is not duplicate - Python

Good afternoon, guys! Today I am making an insert that does not check if such a record has already been inserted into the database. Through the variables: name, date and number is a missing insert in the table: nome = message.who_name numero =...
asked by 25.12.2018 / 17:52
1
answer

How do I read PHP from MySQL from the bottom up? [duplicate]

My code is as follows:              //Receber o número da página $pagina_atual = filter_input(INPUT_GET,'pagina', FILTER_SANITIZE_NUMBER_INT); $pagina = (!empty($pagina_atual)) ? $pagina_atual : 1; //Setar a quantidad...
asked by 27.10.2018 / 17:18
2
answers

Hibernate, JPA, does not save the new data in the database

I have a Java Spring MVC application, with Hibernate and JPA and HTML interface. I have two forms that depend on the CadernoCadastrados class and their attributes. In the first form I enter the data of a new Notebook, saved in the database...
asked by 29.10.2018 / 15:02
1
answer

Join in three tables does not show all results

SELECT * FROM produto_unidades join produto_notas on produto_notas.id = produto_unidades.produtoNota_id join produto_licitacoes on produto_licitacoes.id = produto_notas.produtoLicitacoes_id where produto_unidades.unidade_id = 2 The join work...
asked by 22.10.2018 / 19:44
1
answer

QLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax (PHP and MySQL)

I'm developing a virtual store with PHP 7 and MySQL. In the requests model class, SQL seems to me to be correct, but since I've been trying to solve the problem for some time, I might be letting something go. Connection class: <?php Cl...
asked by 22.10.2018 / 19:32
1
answer

Get subquery ID field that just pulls MySQL name

Good afternoon! I have a SQL query and would like to get 2 additional fields from other tables, but with other names so they are not ambiguous. See the last two subqueries to retrieve 2 fields as trtTituloOrigem and trtTituloDest...
asked by 23.10.2018 / 19:28
1
answer

Port redirection [closed]

I have the following scenario: I changed the MySQL port 54235, on linux server Centos, I accept connections from outside only on that port. I have old and discontinued third-party software, where there is no option to change the default po...
asked by 14.10.2018 / 18:07
1
answer

Variable error stmt of type Statement

To try to execute the table, however in netbeans it is alerting the error in the line of ExecuteQuery.   Symbol: method executeQuery (String) location: variable stmt of type Statement The error is highlighted, netbeans alerts the message...
asked by 29.11.2018 / 10:37