Questions tagged as 'mysql'

2
answers

Insert imagem.jpg in the database

Good morning! Home I want to insert an image in the database in .jpg format, but when it is inserted it appears like this in the database: ???? JFIF Here is my code related to the image: <form action="" method="POST" enctype="multipart/for...
asked by 08.06.2018 / 11:22
1
answer

Compare values of 2 arrays with PHP

Dear colleagues, I have the following situation: BD 01 ID | DESCRICAO | DRADS 1 | REGISTRO1 | 1,2,3 2 | REGISTRO2 | 1 BD 02 ID | DESCRICAO | DRADS 1 | REGISTRO1 | 1,2 2 | REGISTRO2 | 1 It is necessary to make a <select&...
asked by 07.04.2017 / 10:41
2
answers

Select in another MySQL table

Any tips on how I can select all clients for a particular user? I'm not really understanding the logic of how to do the query .     
asked by 17.04.2017 / 19:40
2
answers

How to pass a different value in an HTML form?

I am creating an HTML date filter so that the SQL query can return a specific value to me. I'm just trying to pass this information on because the form option needs to appear in the month as <option>Março</option> . My SQ...
asked by 08.09.2016 / 04:23
1
answer

Add X days to an already predefined date in MySQL

I need to create a deadline, an expiration date for access In case I am using to capture the current time, the "criado" datetime DEFAULT CURRENT_TIMESTAMP, Where I use CURRENT_TIMESTAMP to get the time of writing in MySQL, after the crea...
asked by 13.02.2017 / 19:16
2
answers

How to remove mysql records for half an hour (or more) ago [closed]

I need to remove mysql records that have been made half a hour (or more) ago. That is, leave only the records of the last 30 minutes. This every time a certain php script runs. How do I?     
asked by 30.01.2017 / 02:37
4
answers

How to return date and time closer to the one informed by the user

I have a table with a list of places where a truck passed with the date / time of its entry and exit +----+------------------+-----------+---------------+ | ID | DATA E HORA | LOCAL | ENTRADA/SAIDA | +----+------------------+---------...
asked by 01.02.2017 / 02:42
2
answers

Disable "sql-mode = only_full_group_by"

I installed mysql in my note and I'm using Linux Mint 18.2. When I run the query: SELECT *,SUM(ValorTotalProdutos) AS ValorTotal, SUM(QtdProdutos) AS QtdFinal FROM tabela WHERE SESSIONID = '77c2c1de02e94581a459ed2d4fa76370' AND StatusCompras =...
asked by 22.08.2017 / 00:28
2
answers

How do I create a page that displays data registered in a bank? [closed]

I have a system with a registration page, I would like another page that shows all the registrations that have already been made, cute as an array. EXAMPLE:    E-MAIL ID       01 Mariana [email protected]   02 Bayonetta [email protected]...
asked by 14.08.2017 / 14:16
1
answer

Filtering records

Good afternoon guys, I have the following the following table: Ihavethefollowingselect:"SELECT DISTINCT 'ip' FROM 'visualizacoes' WHERE MONTH(data) = MONTH(NOW()) AND id_usuario = :id_usuario" Use the distinct to return only one record per i...
asked by 24.06.2016 / 20:56