public function addIn($field, $values, $whereConcat = 'AND')
    {
        if (!is_array($values)) {
            return $this;
        }

        $field = (0 < count($this->wheres) ? ' ' . $whereConcat . ' ' . $field : $field);

        //~ Bind values (more safety)
        $index  = 1;
        $fields = array();
        foreach ($values as $value) {

            $name = ':value_' . $index;

            $fields[]           = $name;
            $this->binds[$name] = (string) $value;

            $index++;
        }

        $this->wheres[] = $field . ' IN (' . implode(',', $fields) . ')';

        return $this;
    }
public function addIn($field, $values, $whereConcat = 'AND')
    {
        if (!is_array($values)) {
            return $this;
        }

        $field = (0 < count($this->wheres) ? ' ' . $whereConcat . ' ' . $field : $field);

        //~ Bind values (more safety)
        $index  = 1;
        $fields = array();
        foreach ($values as $value) {

            $name = ':value_' . $index;

            $fields[]           = $name;
            $this->binds[$name] = (string) $value;

            $index++;
        }

        $this->wheres[] = $field . ' IN (' . implode(',', $fields) . ')';

        return $this;
    }
public function addIn ( $ field , $ values , $ whereConcat = 'AND' ) { if ( ! is_array ( $ values ) ) { return $ this ; } $ field = ( 0 < count ( $ this -> wheres ) ? ' ' . $ whereConcat . ' ' . $ field : $ field ) ; //~ Bind values (more safety) $ index = 1 ; $ fields = array ( ) ; foreach ( $ values as $ value ) { $ name = ':value_' . $ index ; $ fields [ ] = $ name ; $ this -> binds [ $ name ] = ( string ) $ value ; $ index ++ ; } $ this -> wheres [ ] = $ field . ' IN (' . implode ( ',' , $ fields ) . ')' ; return $ this ; }
Add In list item.

@param  string $field Field name
@param  array  $values List of values (integer)
@param  string $whereConcat Concat type with other where elements
@return self
Add In list item .