Questions tagged as 'mysql'

1
answer

query update error

The $query1 and $query2 work, but the $query1a update is not set, does anyone know if it is a syntax error? $conexao = mysqli_connect('localhost','rr','4ai','rr') or die('Erro ao conectar ao banco de dados'); $query1 = "...
asked by 21.05.2018 / 15:37
1
answer

How to replace all values of a given table in MYSQL at once?

I have a table ( produtos ) that has column product_params Several products have the value of this table with max_order_level="" and I want to replace all of them with max_order_level="1" , that is, change the empty...
asked by 22.05.2018 / 20:06
2
answers

Update or insert with data from another table

I have this SQL command to update the REQUISICOES table with the data in the REQUISICOES_ATUALIZA table. Use as a key to update the field number_requisition, but I need that if I do not find correspondencia in the...
asked by 30.05.2018 / 17:24
1
answer

Export SQLite to MySQL

I've used SQLite for a project, with it it's possible to create a database with '.db' format and see inside and everything. Is it possible to export in MySQL a file with the database created in the same way as in SQLite? I use the MySQL Workb...
asked by 18.06.2018 / 18:29
1
answer

Insert progress bar with php - Bootstrap [closed]

You can insert a progress bar using bootstrap for amount of data inserted into a given table in the database? Ex: If I have 100 records the bar would progress until you reach the number 100.     
asked by 19.06.2018 / 16:48
1
answer

Cross Table in MySql

Does anyone know how to implement a Cross Table in MySql to help me? I need to transform a query that always returns 4 rows of result to only 1 row placing each row field in columns next to each other, as shown in the image below. NOTE: Queue fi...
asked by 20.06.2018 / 00:34
1
answer

Error creating tables with foreign keys

Running the script below the error occurs:    Can not add foreign key constraint when creating the last two tables. create database Cinema; use Cinema; create table Filme ( id_filmes int primary key auto_increment not null, n...
asked by 15.06.2018 / 05:14
1
answer

Make two queries in one table in MySql

I have a table in MySql database where I will make a query. This query needs to be done as follows: For those who have a plan on the site: Allow search by: name, category (different table), address, neighborhood (different table), keyword...
asked by 15.06.2018 / 02:43
2
answers

Line break within a MYSQL query

Hello, can anyone help me with line breaks within a mysql query? The code looks like this: CONCAT('Origem -> ',vEnderecoOrigem,' \r\nDestino ->',vEnderecoDestino) The result: Origem -> Rua Exemplo Origem Destino -> Rua Exem...
asked by 17.05.2018 / 23:01
1
answer

MySQL Query returning differently

I have the following Query : select MONTHNAME(ta2.change_time) as mes, MONTH(ta2.change_time) as numeroMes, case when s2.name like '%Servidores' then cast(SUM(ta2.time_unit) as UNSIGNED) * 1.5 else cast(SUM(ta2.tim...
asked by 17.05.2018 / 20:54