Questions tagged as 'select'

3
answers

Why "= NULL" does not work? [duplicate]

In%%, when fetching all records with a given field with value SQL Server , if I do the following no records are returned: SELECT * FROM clientes cli WHERE cli.cpf = NULL However, if you use the following syntax: SELECT * FROM...
asked by 17.05.2017 / 16:25
4
answers

Login in PHP with permission levels

I have a problem with my code to separate the logins. I want when a login with Rank = 1 is entered it redirects to a page, and when Rank is = 0 go to another page. I tried to do but I did not have a result because he always...
asked by 18.04.2014 / 12:25
3
answers

Select with WHERE condition with multiple values in the same column

I have two tables in my bank and I do the JOIN with them. One table is a list of people and the other list that person's characteristics. By logic there is only one person and each person can have several characteristics, so two tables. So when...
asked by 01.05.2018 / 17:02
1
answer

How do I SELECT on 2 or more Tables with 2 or more conditions?

I have a problem making a select with the following conditions: I want to display the data with either condition1 or condition2 Select * tabela inner join tabela2 WHERE campo = 0 and campo2 = '' and campo3 or campo10 is NULL Select all the...
asked by 11.03.2014 / 11:14
1
answer

Does PHP work with cache?

I'm noticing that my application is experiencing some error, or else my browser is always caching, even though I'm performing the cleanup. I have a .php file and contain the loadEvent function, which is responsible for doing sel...
asked by 21.11.2016 / 11:30
1
answer

Sql - Select first and last record

I have the following tables: CREATE TABLE tb_lote ( id_lote integer NOT NULL DEFAULT nextval('tb_lote_seq'::regclass), ds_lote character varying(255), CONSTRAINT pktb_lote PRIMARY KEY (id_lote) ); CREATE TABLE tb_lote_ticket ( id_lote...
asked by 02.10.2015 / 17:09
1
answer

Limit and Offset for web paging in SQL Server

I'm working with PHP and I have about 8000 records currently in DB. As it is for a web page, I need to make a pagination to be viable reading the data. As I understand it, I have to do something similar to limit and offset to...
asked by 28.11.2016 / 13:35
1
answer

VBA - SQL - Filter with SELECT

I would like help with extracting information from another worksheet through SQL. The link on the worksheet where you will establish the connection and extract the information is this: Google Drive The link to the spreadsheet where the D...
asked by 17.11.2018 / 23:00
5
answers

What is the best practice to know if a row exists in a SELECT in MySQL?

For example, when we are going to check if a user is already registered in the table, we do not need any data return by the query, just check if the number of rows is greater than 0 ( num_rows > 0 ). In the scripts and frameworks...
asked by 09.07.2015 / 22:36
1
answer

How to customize a select arrow

I have a price list, it has a select for the person to choose the payment cycle as shown in the image:  beingthatIdidwithCSS:-webkit-appearance:none;background:#E9E9E9url("../imagens/bgs/seta.png") 95.5% 50% no-repeat; As shown in t...
asked by 01.05.2014 / 21:57