buki\Pdox::in PHP Метод

in() публичный Метод

public in ( $field, array $keys, $type = '', $and_or = 'AND' )
$keys array
    public function in($field, array $keys, $type = '', $and_or = 'AND')
    {
        if (is_array($keys)) {
            $_keys = [];
            foreach ($keys as $k => $v) {
                $_keys[] = is_numeric($v) ? $v : $this->escape($v);
            }
            $keys = implode(', ', $_keys);
            if (is_null($this->where)) {
                $this->where = $field . ' ' . $type . 'IN (' . $keys . ')';
            } else {
                $this->where = $this->where . ' ' . $and_or . ' ' . $field . ' ' . $type . 'IN (' . $keys . ')';
            }
        }
        return $this;
    }