protected function _where($Sql)
{
// Figure out the concatenation operator.
$Concat = '';
if ($this->_OpenWhereGroupCount > 0) {
$this->_WhereConcat = $this->_WhereGroupConcat;
}
if (count($this->_Wheres) > 0) {
$Concat = str_repeat(' ', $this->_WhereGroupCount + 1) . $this->_WhereConcat . ' ';
}
// Open the group(s) if necessary.
while ($this->_OpenWhereGroupCount > 0) {
$Concat .= '(';
$this->_OpenWhereGroupCount--;
}
// Revert the concat back to 'and'.
$this->_WhereConcat = $this->_WhereConcatDefault;
$this->_WhereGroupConcat = $this->_WhereGroupConcatDefault;
$this->_Wheres[] = $Concat . $Sql;
return $this;
}