select productID from products inner join prodprops on prodprops.product=products.productID where (prodprops.prop=1 and prodprops.value between '0' and '300') and (prodprops.prop=3 and prodprops.value='G') and products.type = 1 /* If I get rid of one of the "(prodprops.prop= and prodprops.value=)" lines I get results, how can I get results checking against both? */ products table productID type price prodprops table ppropID prop value product