$select = 'select * from watches where 1=1';
$binds = [];
if(!empty($from)) {
$select .= ' and from>=?';
$binds[] = $from;
}
if(!empty($before)) {
$select .= ' and before<=?';
$binds[] = $before;
}
$stmt = $this->_instance->prepare($sql);
$stmt->execute($binds);
$items = $stmt->fetchAll(PDO::FETCH_ASSOC);