Questions tagged as 'mysql'

2
answers

Parameter automation Mysql does not work

I'm trying to create a way to automate the business of adding parameters in the query to prevent sql inject, but it does not work! Here's my code: public static MySqlCommand criarQueryComParametros(string tabela, string condicao) { List...
asked by 17.10.2017 / 01:37
2
answers

Group By by Date

I have a table named tsc , with the properties ID and DataHoraOcorrencia . I need to query the amount of ID and DataHoraOcorrecia . SQL SELECT DataHoraOcorrencia as DataHora, COUNT(tsc.ID) as Quan...
asked by 10.11.2017 / 14:13
1
answer

Change. by, with PHP or MySQL

I have a table that saves data that comes from a txt and I have a value field and it saves it in the format: 5.00 How do I change the bank or PHP to 5,00 ? That is, changing . (dot) to , (comma). Code : <...
asked by 09.01.2016 / 02:02
3
answers

Date Range Search in SQL

I have a table with the structure below Ineedtomakeaquerywithacertainintervalinordertogenerateareport.IusedtheBetween...commandandwithititreturnsthefollowingvalues But for the interface I need to display the form dd-mm-yyyy and not as t...
asked by 17.02.2016 / 19:42
3
answers

How to select all tables in mysql

What is the query that makes me query a certain database in mysql that brings me all its tables?     
asked by 11.03.2016 / 18:23
3
answers

How to calculate difference of dates that are a previous row with MYSQL?

I have a table where I record the time when a given request had its status_id changed. This table I call historico_status_solicitacoes . In this table, I have the following fields: id , status_id , solicitacao_id...
asked by 01.11.2018 / 21:09
2
answers

Problem with SQL relational logic

Considering this scheme CREATE TABLE bra_ocorrencias ( estado varchar2(2), genero varchar2(1), ano number, nome varchar2(30), num_ocorrencia number ); I need to make a query that returns me the most registered name for w...
asked by 06.07.2018 / 16:29
1
answer

How to select the name and salary of the employee of 'MG' who receives the highest salary? [closed]

I have a table with the columns nome , salario and alocacao . How do I select only the worker who has the highest salary and who has the value mg in the alocacao column, without using MAX() ?     
asked by 22.04.2017 / 19:54
1
answer

Error trying to connect via ODBC to MySQL [duplicate]

I'm trying to make a connection via ODBC with MySQL Database to access data in Excel, however after performing all the necessary settings the following error window is shown to me: SoIconfiguredtheconnector: If you have any idea wha...
asked by 05.04.2017 / 21:19
2
answers

Log table using MySQL

How to create a MySQL audit log table that stores when and what was changed in each record? Does MySQL provide something that can make this kind of thing easier?     
asked by 02.09.2015 / 14:56