Questions tagged as 'select'

2
answers

Return vehicles that have all parts in a given table

I have the following question, in my database I have the following tables: | veiculo | | idVeiculo | placa | | peca | | idPeca | nomePeca | | relVeiPec | | idVeiculo | idPeca | | pecaObrig | | idPeca |...
asked by 27.05.2016 / 20:54
1
answer

Comparison of values with SELECT

Hello, I'm creating a search project and need to make a commit in my database. I have an "establishments" table in my SQLite database, with the following columns: id, name and category . And a String variable named " nameStab " I need to...
asked by 08.11.2015 / 00:39
3
answers

Select works on localhost but does not work on the server

The select was working normally in wamp, however when uploading the site to the server the information on some pages simply stopped coming. The only part where select is working is the login area of the administrative area, I ha...
asked by 02.10.2015 / 19:22
1
answer

Left outer Join does not have Null values [duplicate]

I have two tables: formulario_campo ( cod_campo, descricao, cod_formulario ) Filled with the following values - input_nome, Nome, 1 - input_sexo, Sexo, 1 The second table: — formulario_valor(cod_campo,valor,cd_oportunidade) In...
asked by 21.01.2016 / 14:40
1
answer

How to do a select beginning with a certain line

How do I get a Select starting with example from the second row of my table? I know that by using ASC limit 1,1 I can choose the second line, but how do I start from it?     
asked by 14.01.2016 / 16:47
1
answer

select value in array

Good, Looking at this query: $sql = mysql_query("select A, B, C, D from table"); $row_sql = mysql_fetch_assoc($sql); I want to get column A and put all values in an array: $var = array('value1','value2','value3','value4'); How best...
asked by 12.08.2015 / 15:46
1
answer

Maximum and minimum payment

I have two tables, customers and payments , I want to check for each client which was the highest and lowest payment that each one made. I did this SQL, but it did not work, could anyone help me? SELECT c.customerName, max(p.amoun...
asked by 20.10.2015 / 18:06
1
answer

Android Sqlite: Displaying database contents in textView?

I'd like to know how I display content from the Sqlite database in textviews. I'm using the following method to display in a CustomListView: public Cursor getAllData () { String buildSQL = "SELECT * FROM " + DatabaseHelper.DiferencaPer...
asked by 25.01.2015 / 02:07
1
answer

List grouped and filtered data

I am doing a query in PUBS, the database that is used in the MSDN tutorials for SQL Server, and I can not find a way to do it. The two tables I use are publishers and titles that have published book information and their publishers. I...
asked by 07.07.2014 / 19:28
1
answer

Create a search within a select

I wanted to know some method to incorporate a search for, to facilitate the use of select in a system with many categories, looking for the internet, I found a paid script that has a solution, let's say better. I will leave an image below that s...
asked by 30.05.2014 / 23:39