Questions tagged as 'mysql'

1
answer

PHP and mysql hours count

Good evening, I'm new here. One question I think is basic. I will create an "application" with PHP and mysql where I control the working hours of each collaborator with daily inputs and outputs. The doubt is the SQL just stores the data...
asked by 31.07.2016 / 05:43
1
answer

"\ n" be converted to "br" automatically

I'm developing a PHP post system with MySQL. I need the line breaks that the user enter in textarea to be converted to <br /> . The variable $texto (contains the contents of the post) goes to the database in the colu...
asked by 15.10.2016 / 19:11
1
answer

Replace in update, change the extension to file names

I have a table with images, images , in which one of these columns ( file_name ) has image names, jpg other png , what I need is to change, make UPDATE all to the extension png , that is, change any extensio...
asked by 21.10.2016 / 13:45
1
answer

Looking for nearby places with DISTINCT? (Maps API)

I have a separate table in MYSQL with the addresses of the users containing the location information (latitude and longitude), each user being able to have more than one registered address. My goal is that when performing a search for a location...
asked by 27.02.2017 / 03:12
1
answer

Remove old MySQL records automatically

I have a table that stores logs for a system. I want some method of automatically deleting records longer than 60 days. Can you do that?     
asked by 07.07.2016 / 21:32
3
answers

How do I know if a record has been added to the database?

Hello, I'm working on an alert system, when a larger than normal data is registered in the database an alert has to appear on the page where the user is browsing. The problem is that I do not know how to check if an element has been added to the...
asked by 15.07.2016 / 23:08
1
answer

SQL query separated by space

I have the following sql query: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); The result is: 07: 30: 00: 00: 00,13: 30: 00: 17: 00: 00 How do I get the com...
asked by 09.07.2016 / 13:59
1
answer

Problem in calling DriveManager.getConnection?

I'm studying Java with database and I'm doing a few examples. On the PC with Windows I used a code and it worked, there was no problem, I now use Linux and the same code is giving error when calling the% with% of DriveManager.getConnectio...
asked by 23.01.2017 / 13:50
1
answer

Sorting multiple columns

The sales table has the following structure: id_venda | nome_cliente | data_venda | data_agendamento | data_cancelamento | data_ligacao Where the "date" fields are all datetime. I would like to sort according to the last move that occurred....
asked by 19.11.2018 / 20:32
1
answer

How to make a button in PHP, send data to my mysql table?

I placed a button on my page to send the data to a table in mysql. <button type="button" class="btn btn-block btn-primary">CADASTRAR</button> How do I, when I click the button it does the register operation in the table, the exa...
asked by 13.06.2016 / 18:24