public function _whereIn($Field, $Values, $Op = 'in', $Escape = true)
{
if (is_null($Field) || !is_array($Values)) {
return;
}
$FieldExpr = $this->_parseExpr($Field);
// Build up the in clause.
$In = array();
foreach ($Values as $Value) {
if ($Escape) {
$ValueExpr = $this->Database->connection()->quote($Value);
} else {
$ValueExpr = (string) $Value;
}
if (strlen($ValueExpr) > 0) {
$In[] = $ValueExpr;
}
}
if (count($In) > 0) {
$InExpr = '(' . implode(', ', $In) . ')';
} else {
$InExpr = '(null)';
}
// Set the final expression.
$Expr = $FieldExpr . ' ' . $Op . ' ' . $InExpr;
$this->_where($Expr);
return $this;
}