Questions tagged as 'query'

1
answer

Duplication of submit with jquery and php

I have a form on which to register phones called edit_form.php: <form method='post' name="<?php echo $idEmp; ?>" id='emp-SaveForm-tel' action="#"> <input type='hidden' name='id' value="<?php echo $idEmp; ?>"> &l...
asked by 01.02.2017 / 18:08
2
answers

Update running multiple times in a single instance

I have had a problem with my system that some pages that do UPDATE in the inventory tables sometimes run multiple times, so the page was not loaded twice because I created a protection account. A single mysql_query instance is somehow running mu...
asked by 13.07.2015 / 19:18
1
answer

Query to return recurrence values, which have not yet been created in the database

I need to query the database where the records are not yet saved. I'll explain better: In a system that I am developing, the user can register a recurring expense, that is, that will repeat every month / days (according to the user's choice)....
asked by 12.12.2015 / 18:05
6
answers

How to count the number of clients that have returned from one year to the other through SQL?

I have a Serviços(Nro_Serv, Data, Cliente, Valor) table and would like to get customers who did service with me in a year X (ex: 2011) and who also did in a year Y (ex: 2012). I tried to use COUNT(*) and then GROUP BY Cliente HA...
asked by 20.03.2014 / 18:29
2
answers

INNER JOIN with equal fields in a table - Error: # 1066 - Not unique table / alias: 'tb_user' [duplicate]

I have 3 tables as follows: Intb_user,Ihavetwotypesofusers(buyer,seller)inanENUMfieldtodifferentiatetheusertype.IntheshoppingcartIhavetheuserIDs,product,andtransactionnumber.Ilink2timestotb_usuariotoknowwhoboughtandwhosold.IwanttoperformaS...
asked by 27.11.2016 / 19:33
3
answers

Order By - Leave specific record by first

Store_Name | Sales | Date America | 1500 | 05-Jan-1999 Boston | 700 | 08-Jan-1999 Canada | 300 | 08-Jan-1999 Dinamarca | 250 | 07-Jan-1999 I have this table, I would like to sort it in a way where Boston would be the...
asked by 23.07.2014 / 15:49
4
answers

MAX with LIMIT does not give correct result

Imagine the following lines in my MySQL database: I want a query that displays the name and age of the person who is the oldest in the table, so I did this query : SELECT nome, MAX(idade) from pessoas; But it does not return th...
asked by 22.11.2018 / 16:26
2
answers

How to insert selecting from two different tables?

TABELA 1 - ID - IMOVEL - CODIGO - IMAGEM_G <----- nessa tabela este dado é vazio. - IMAGEM_P TABELA 2 - ID - IMOVEL <----- nessa tabela este dado é vazio. - CODIGO <----- nessa tabela este dado é vazio. - IMAGEM_G - IMAGEM_P I...
asked by 19.01.2015 / 19:09
1
answer

SQL History Query

I'm in need of a help with SQL. I need to do a query that returns me a history of the current date up to 7 days back. Could someone please help me?     
asked by 18.09.2014 / 14:26
3
answers

Remove repeated lines in all respects in Oracle [closed]

In a CADASTRO column I have two lines repeated in all respects: NOME ID EMAIL SEXO JOAO 1234 [email protected] M JOAO 1234 [email protected] M How to compare these two lines, check if all the columns are identical and d...
asked by 04.05.2017 / 21:18