public function andWhere($conditions, $bind = [])
{
if (is_scalar($bind)) {
$conditions = trim($conditions);
if (!Text::contains($conditions, ' ')) {
$conditions .= ' =';
}
$parts = explode(' ', $conditions, 2);
$conditions = preg_replace('#[a-z_][a-z0-9_]*#i', '[\\0]', $parts[0]) . ' ' . $parts[1];
$column = str_replace('.', '_', $parts[0]);
/** @noinspection CascadeStringReplacementInspection */
$from = ['`', '[', ']'];
$column = str_replace($from, '', $column);
$conditions = $conditions . ' :' . $column;
$bind = [$column => $bind];
}
$this->_conditions[] = $conditions;
$this->_bind = array_merge($this->_bind, $bind);
return $this;
}