public function like($Field, $Match = '', $Side = 'both', $Op = 'like')
{
if (!is_array($Field)) {
$Field = array($Field => $Match);
}
foreach ($Field as $SubField => $SubValue) {
$SubField .= ' ' . $Op . ' ';
switch ($Side) {
case 'left':
$SubValue = '%' . $SubValue;
break;
case 'right':
$SubValue .= '%';
break;
case 'both':
if (strlen($Match) == 0) {
$SubValue = '%';
} else {
$SubValue = '%' . $SubValue . '%';
}
break;
}
$Expr = $this->conditionExpr($SubField, $SubValue);
$this->_where($Expr);
}
return $this;
}