Questions tagged as 'mysql'

1
answer

Can you select multiple tables with the beginning of the name the same?

On the base base_suporte , there are the tables with the user token and the support token suporte_tokenUser_tokenSup . On the general support page, all media need to appear, this part is complete and working. But in the client par...
asked by 23.12.2017 / 04:32
2
answers

How to update a database without action from the client?

I'm not very advanced in php, sql and everything else, and I came up with the following doubt. Assuming that today is day 10 and I want that if it happens on day 12 an information in the BD is updated to 'sent' for example, if the user is open h...
asked by 06.04.2018 / 23:05
2
answers

Result of a MYSQL search in line, not column

Good morning. I have a table that lists a number of reasons each time they happen. I'm using a select to group these motives together and result in the 5 most recurring ones. This is my code: SELECT count(*) as NumeroDeVezes, motivos FR...
asked by 09.04.2018 / 12:58
1
answer

How to save a localdate in a mysql table?

I have a table book that has a column of type "Date" and in my java code I have a field of type "localdate". I need to save the data from the "LocalDate" field in the table however I am finding it difficult to do this, any suggestions? Java:...
asked by 25.06.2017 / 20:52
1
answer

MySQL SHOW COLUMNS

I would like to just bring the columns of the bank and sort of form that I want for example: show columns FROM table The above code brings up all the columns in the table. bring the ordered columns. SHOW TABLE.COLUNA1, TABLE.COLUN...
asked by 04.08.2017 / 17:55
1
answer

Repetitions and combinations of values

I have a table (quina) with 5 fields, each field can have the value of 1 to 80. I would like to know if it is possible in SQL or only in Delphi, to get the dukes (combinations of 2 numbers) between 1 and 80 in the fields from c1 to c5. no mat...
asked by 02.10.2017 / 21:24
1
answer

SQL query problem in laravel

I'm not really understanding these queries in laravel php. I did a search of cities states where when searching the state lists the corresponding city, but it does not find the id of the table if the relationships were done correctly. Municip...
asked by 04.10.2017 / 18:49
1
answer

Error during DELETE: You can not specify target table '...' for update in FROM clause

I'm trying to delete data (where the stock is equal to zero and the discount value is less than the total average discount value) with this query: DELETE FROM veiculo WHERE estoquetotal = 0 AND valordesconto < (SELECT AVG(valordesconto)...
asked by 03.08.2017 / 15:38
2
answers

Insert multiple with PDO php and MySql

My situation, A POST form with a text input and two input radios. Inputs are named respectively nome[0] and tipo[0] . When someone adds more fields to the form, I put .attr to get nome[1] and tipo[1]...
asked by 29.01.2018 / 02:27
1
answer

SELECT ... WHERE LIKE name bind_param

I have the following code: <?php $link = new mysqli("localhost", "root", "minhasenha", "meu_db"); $produto = $_GET['q']; $produto = '%'.$produto.'%'; $busca_produtos = $link->prepare("SELECT id, nome_com from clientes where nome_com...
asked by 01.08.2017 / 20:45