public function in($item, array $list, $cond = null, $not = false)
    {
        $inClause = '';

        if (null == $this->oosql_where && null == $this->oosql_in && null == $this->oosql_between) {
            $inClause .= ' WHERE ';
        } else {
            $cnd = ' AND ';

            if (null != $cond) {

                if (strtolower($cond) == 'or') {
                    $cnd = ' OR ';
                }

            }
            $inClause .= $cnd;
        }
        if ($not) {
            $item = $item . ' NOT ';
        }
        $inClause .= $item . ' IN ';

        $obj = $this;

        $list = array_map(function ($data) use ($obj) {
            return (!$obj->validInt($data)) ? $obj->quote($data) : $data;
        }, $list);

        $inClause .= '(' . implode(',', $list) . ')';

        $this->oosql_in = $inClause;

        return $this;
    }
public function in($item, array $list, $cond = null, $not = false)
    {
        $inClause = '';

        if (null == $this->oosql_where && null == $this->oosql_in && null == $this->oosql_between) {
            $inClause .= ' WHERE ';
        } else {
            $cnd = ' AND ';

            if (null != $cond) {

                if (strtolower($cond) == 'or') {
                    $cnd = ' OR ';
                }

            }
            $inClause .= $cnd;
        }
        if ($not) {
            $item = $item . ' NOT ';
        }
        $inClause .= $item . ' IN ';

        $obj = $this;

        $list = array_map(function ($data) use ($obj) {
            return (!$obj->validInt($data)) ? $obj->quote($data) : $data;
        }, $list);

        $inClause .= '(' . implode(',', $list) . ')';

        $this->oosql_in = $inClause;

        return $this;
    }
public function in ( $ item , array $ list , $ cond = null , $ not = false ) { $ inClause = '' ; if ( null == $ this -> oosql_where && null == $ this -> oosql_in && null == $ this -> oosql_between ) { $ inClause .= ' WHERE ' ; } else { $ cnd = ' AND ' ; if ( null != $ cond ) { if ( strtolower ( $ cond ) == 'or' ) { $ cnd = ' OR ' ; } } $ inClause .= $ cnd ; } if ( $ not ) { $ item = $ item . ' NOT ' ; } $ inClause .= $ item . ' IN ' ; $ obj = $ this ; $ list = array_map ( function ( $ data ) use ( $ obj ) { return ( ! $ obj -> validInt ( $ data ) ) ? $ obj -> quote ( $ data ) : $ data ; } , $ list ) ; $ inClause .= '(' . implode ( ',' , $ list ) . ')' ; $ this -> oosql_in = $ inClause ; return $ this ; }
Creates an IN clause
@param mixed $item  Subject of comparison
@param array $list  A list of values
@param string $cond OR|AND
@param boolean $not
Creates an IN clause