Questions tagged as 'mysql'

2
answers

Migrate EXTRACT (YEAR_MONTH, data) from MySQL to SQL Server

I have a MySQL query that I would need to convert to SQL Server. I tried with datepart of SQL Server but it does not maintain the main feature of the MySQL query, which is to maintain the month-to-month range but also to take into acco...
asked by 20.02.2018 / 03:15
1
answer

Replace checbox for radio

I have this code where I create two columns of type="checkbox" : $tabela1 .= '<td> <input type="checkbox" name= "Id[]" value="'.$rows_cursos['Id'].'"></td>'; $tabela1 .= '<td> <input type="checkbox" name= "Id[]...
asked by 16.02.2018 / 10:55
1
answer

How to use a join clause by adding a column indicating the existence of a link

I have two tables Horas (id, aluno_id, atividade_id) and Atividades (id, emblema_id) In addition to returning all the badges, I need to return a column that tells me if that student owns it. To know if he has, it is enough that he has...
asked by 16.02.2018 / 13:05
0
answers

Exporting data from mysql to csv

I am trying to export specific data from a bank from a client to csv, I searched the internet and they said I would get using the code below. SELECT * FROM escola INTO OUTFILE '/var/lib/mysql-files/orders.csv' FIELDS TERMINATED BY ',' ENCLOSED...
asked by 16.02.2018 / 13:49
1
answer

Find table field with query result from a different table?

I recently asked a question: search for last 24h lines that repeat the most (MySQL) And it was answered, I now have another question. I do the following to find from and to of the most repeated lines of the last 24h, but th...
asked by 22.02.2018 / 03:38
0
answers

SchemaSpy - Error while executing

I was reading about programs that generate database documentation and found SchemaSpy , by what I understand it generates an html with the bank structure (tables, columns, fks, data dictionary, etc ... ). As per the documentation, I ins...
asked by 15.02.2018 / 03:47
0
answers

Iteration While with date and time

How to organize the method JAVA below, to get the output as the example. I have an array of schedules (would be input and output), and I need to associate these schedules with a date range, while I was in and out of the the same day I cou...
asked by 15.02.2018 / 01:01
1
answer

Register user's date, time and IP in Login

Hello, I have a problem in which I can not find a solution (and I'm still a layman in PHP to help), I've reviewed the internet and found nothing that could help me, I have a PHP login page where checks if the user exists in a table, if it exists...
asked by 14.02.2018 / 17:50
1
answer

Select if it does not exist in another table, but if there is no record in 24h

I have two tables: links works I need to return values from the links table, but first I need to see if it exists in the works table, and if it exists it must have been inserted more than 24h, otherwise this record can not be returned...
asked by 14.02.2018 / 15:26
0
answers

Incomplete multi-master replication

I used SymmetricDS to synchronize mysql data to a server in distant, image-shaped places. When the master (corp-000) does some change / insertion / deletion in the database it replicates to the stores, so far so good, that's what should ha...
asked by 14.02.2018 / 05:38