How come when I’m trying to.

 
Correl: Sailend: This is exactly what this will do: SELECT controller FROM your_table WHERE col1 = 1 OR col2 = 1 OR col3 = 1 . ;

Correl: Sailend: You are thinking wrong way about it. You don’t need to *exclude* anytuing. You need to *select* only rows you need

Alexader: Salle, let me try this once again

Roig: Salle, let me try and let you know

Correl: Sailend: Define which rows you want to *select* because that directly translates to WHERE clause

Correl: Sailend: You SELECT something FROM some tables WHERE rows match this condition

Melandez: Salle, i am getting all the list of controller which is not correct result

Lautzenheiser: Select controllers from psg.permission where d=1 or d=0 or edit=1 or edit=0 or ind=1 or ind=0 or v=1 or v=0 or ad=1 or ad=0; here is my sql query

Correl: Sailend: You get exactly what you asked for :

Swed: Thats a bit different from what salle suggested.

Correl: Sailend: WHERE d=1 OR d=0 will return all rows where d=1 and all rows where d=0

Slaughter: Salle, no no i need to exclude the controller if all the column value matches to 0

Cermeno: It should only returns 6 controllers name

Correl: Sailend: If you do why did you add OR d=0 . OR edit=0 . etc?

Correl: Sailend: If you do not want to SELECT rows where d=0, edit=0 etc. why did you add OR d=0 . OR edit=0 . ?

Hyon: Salle, i did what you have suggested

Correl: Sailend: No you didn’t

Swatsworth: Thats why i told you i used sub query to exclude to the result

Correl: Sailend: That’s what I suggested: sailend: This is exactly what this will do: SELECT controller FROM your_table WHERE col1 = 1 OR col2 = 1 OR col3 = 1 . ;

Correl: Sailend: Where do you see 0s here?

Correl: Sailend: Stop thinking and talking about excluding results

Lafont: Salle, tell me if i follow your suggestion what output should i get according to your query

Correl: Sailend: Isn’t it obvious?

Correl: Sailend: Try this: SELECT controller FROM your_tbl WHERE d=0;

Jakubov: It will give all the name of controllers having d=0

Dimperio: Salle, no dout on that

Correl: Sailend: Now what about: SELECT controller FROM your_tbl WHERE d=1; ?

Kaestner: It will give me all the list of controller having d 1

Correl: Sailend: Correct! That’s first step

Correl: Sailend: Next one: SELECT controller FROM your_tbl WHERE d=1 OR edit=1; ?

Correl: Sailend: What rows it will return?

Moffit: It will give me list of controller where d matches to and edit matches to 1

Correl: Sailend: Will it return any rows where both d and edit are 0?

Sands: Salle, what if any controller which have d=1 and other field having zero

Correl: Sailend: You tell me :

Viles: Salle, ok got the result thank you, sorry for asking such a stupid question

Correl: Sailend: Nothing to sorry about. As I told you you were thinking about it in reverse way

Correl: Sailend: There is no need to exclude anything. SELECT only rows you want and the rest will be excluded

Notestine: Salle, yes the thing of “excluding” is hovering all around so i couldnot think in that simple way

Correl: Sailend: Like when you go to supermarket you don’t go to the cashier and tell him to exclude all the goods you don’t want. Instead you fill your cart with the goods you want to buy and don’t care about the rest.

Brawner: Salle, that one was great example :

Propp: Salle, way to simpler to understand than my teacher does

Correl: Sailend: Technically in both cases you exclude unwanted items : It is the approach that differs

Schellermann: How come when I’m trying to log in to my mysql server with my root account