Questions tagged as 'if'

1
answer

How to use if-else sets correctly in C?

I'm having a problem with this code in DevC ++, as I see the part of the if-else conditions is perfectly indented and organized (all if has its else and its keys). The error is in the last else , but I do not know how...
asked by 26.10.2018 / 03:57
2
answers

How can I use something similar to an IF in an SQL query

I'm applying a SQL q query on Oracle SQL Developer in multiple tables where Column of a view is null in some places and then I'll need to use values of Column and not% I know how to use the query IF very well. Home Can anyone hel...
asked by 03.06.2016 / 16:35
2
answers

If condition in variable

I have a variable named LastClass , it can have the value of headerSortDown or headerSortUp . I'm rescuing it from an ordered column. I want to transfer this variable to <a href> but wanted to change the text of it. For ex...
asked by 19.01.2015 / 19:35
2
answers

How to show multiple error messages simultaneously in form?

I'm trying to make my registration page show all messages from forgotten fields together like in this example: Butitonlyshowsinparts:1-"Username already exists" and "Email already exists" or 2 - "Please insert a username", "Please insert...
asked by 23.05.2014 / 16:50
1
answer

Using Case or if

I am a beginner in SQL and am having difficulty using CASE WHEN . I have a table called CRM_PROCESSO , in which there is a column with the Status option, but the answer for this status is numeric, being 1 - Aberto ,...
asked by 12.09.2018 / 14:16
2
answers

Doubts if else returning 0

I'm trying to do the following exercise:    10) A fruit bowl is selling fruits with the following price list: Até 5 Kg Acima de 5 Kg Morango R$ 2,50 por Kg R$ 2,20 por Kg Maçã R$ 1,80 por Kg R$ 1,50 por Kg       If the cust...
asked by 03.09.2018 / 01:07
1
answer

Error in php if, login authentication system

Hello, so I'm trying to make a simple login system with php and mysql, but it's giving error in my if. I already moved ... too much and nothing, when it seems that right it does not authenticate you put any password q or login name and will. Thi...
asked by 09.11.2017 / 00:01
1
answer

How to compare a string from an array in C?

I have the following variables: char nome[10][8]; int i; --> Sendo esta para o loop I ask the user to enter 5 names and then I read the variable: printf("Entre 5 nomes : \n"); for(i=0; i< 5 ; i++) { scanf("%s",nome[i]); } But aft...
asked by 29.03.2017 / 07:55
1
answer

In this case use switch or if?

I have an exercise to do that consists of the following: The user informs the salary, and depending on the value informed, it gains an increase according to the table. Example: From 1000 to 1500 he gains 10% From 1500 to 2000 he earns 5% 2000...
asked by 17.03.2017 / 05:15
3
answers

Difference between two codes

Code 1, if variable num is 1 or 2 for example, when conv() is called again and I choose option 3 to exit then it runs print I hope I have been useful (: program does not close, only the next time I choose option 3. In code 2 the...
asked by 13.03.2017 / 18:34