# Select query

**URL:** <https://forum.kirupa.com/t/select-query/245541>\
**Category:** programming\
**Created:** [November 30, 2007, 6:42pm UTC](https://forum.kirupa.com/t/select-query/245541 "2007-11-30T18:42:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dali](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dali](https://forum.kirupa.com/u/Dali)\
**Post date:** [November 30, 2007, 6:42pm UTC](https://forum.kirupa.com/t/select-query/245541/1 "2007-11-30T18:42:48Z")

</div>

Can somebody help me with this mysql query i’m trying to make.  
I want to select everything from a table, but that row, where 2 columns have a certain value (both together), as in: if both the entry in column 1 is ‘something’ AND entry in column2 is ‘something’ , don’t select that row? An example: if i have a table with products, and the columns in the table are productid, quantity, out of production , etc… I want to get all the info from the table, but the products that have 0 ‘quantity’ and Y in ‘out of production’(caz there’s no point in showing those to customers). I got the suggestion in another forum for that:  
select \* from table  
where  
(column = ‘0’ and othercolumn!=‘Y’) or  
(column != ‘0’ and othercolumn = ‘Y’)  
but it didn’t work, maybe i’m doing something wrong, no idea, total newb.
