Questions tagged as 'query'

3
answers

Error concatenating component value in query

Queries in my C # Winforms project are being done through StringBuilder . It was suggested here in the OS that I changed the way to generate the query from Consulta.Append("Select * from...") to @"select * from..." because...
asked by 31.10.2018 / 15:15
3
answers

Is there a difference in performance depending on what you are looking for?

Is there a difference in performance when querying the database, depending on the number of characters entered in the query? For example, if a query is made for any record that has the 'a' character, will it spend more processing than searchi...
asked by 20.01.2017 / 00:26
2
answers

Select certain amount of data for each type status

Billy Jow here! In my historical table I have a status field that can take four possible values: 'EVALUATE', 'FAIL', 'REVOK', 'SUCCESS' I want to select 20 records of each status where the date is most recent. Since I want only th...
asked by 11.11.2017 / 14:33
1
answer

subquerie mysql

Personal I have the following structure: CREATE TABLE Cliente ( Id_cliente int NOT NULL, Nome_cliente CHAR(30) NOT NULL, Endereco CHAR(40), Telefone char(12), PRIMARY KEY (Id_cliente) ) Engine=InnoDB; CREATE TABLE...
asked by 09.06.2017 / 02:43
2
answers

PHP Search system ignore capital letters and add keywords

I have a simple search engine that looks up values in the DB and displays it on the page. In the table I have a column called keywords where the words I leave as a search parameter are registered. I need two things. The first is that when typing...
asked by 10.06.2017 / 04:05
1
answer

Problem Query server has gone away

An error occurred in the Query part mysql_query(): MySQL server has gone away What kind of error is this? Query: $sqlinsert = "INSERT INTO tb_trabalhador VALUES(0,'".$Nome."','".$Morada."','".$Tipo."','".$Email."','".$AlvaraNumero."',...
asked by 03.03.2014 / 18:35
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

Is it possible to query the "INSERT INTO table SET field = 'value'" in PostgreSQL?

It is possible to execute the query INSERT INTO nome_tabela SET nome_campo = 'aaaa' in the PostgreSQL database. I needed to migrate a virtual store made in PHP with MySQL , to PostgreSQL . The part of the bank migration I got wi...
asked by 29.12.2017 / 04:52
2
answers

Select dates that are not in the table

I need to set up a report for a customer with the billing for each day of a given month. So the beauty, the problem is that now he wants even the days that have no sale, are shown in the table with the value showing zero. For example, this my...
asked by 14.08.2018 / 13:32
1
answer

Adding multiple select count results in MYSQL

I am trying to add all the clients I have in all my databases, so for this I am doing the following query : SET @total = 0; USE BASE x1; SELECT @total:= @total +COUNT(1) FROM clientes; USE BASE x2; SELECT @total:= @total +COUNT(1) FROM clie...
asked by 29.05.2015 / 20:08