function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ')
{
if ($key === NULL or $values === NULL) {
return;
}
if (!is_array($values)) {
$values = array($values);
}
$not = $not ? ' NOT' : '';
foreach ($values as $value) {
$this->ar_wherein[] = $this->escape($value);
}
$prefix = count($this->ar_where) == 0 ? '' : $type;
$where_in = $prefix . $this->_protect_identifiers($key) . $not . " IN (" . implode(", ", $this->ar_wherein) . ") ";
$this->ar_where[] = $where_in;
if ($this->ar_caching === TRUE) {
$this->ar_cache_where[] = $where_in;
$this->ar_cache_exists[] = 'where';
}
// reset the array for multiple calls
$this->ar_wherein = array();
return $this;
}