select * from post WHERE ip != 2130706433 AND ip != 0 AND ip != 2139062143 AND ip != 127 AND (ip < 2130706432 || ip > 2147483647) AND (ip < 167772160 || ip > 184549375) AND (valid = 1) 我用的数组是这样的 $criteria = array( 'valid'=>1, 'ip' => array( array('$nin' => array(2130706433,0,127,2139062143)), array('$or' => array(array('$gt' => 2147483647), array('$lt' => 2130706432))) array('$or' => array(array('$gt' => 184549375), array('$lt' => 167772160))) ) ); 但是没用