/** * {@inheritdoc} */ public function whereToSql($col, $sign, $expression) { if ($col === 'UNIX_TIMESTAMP(sch.comment_time)') { return 'sch.comment_time ' . $sign . ' ' . $this->timestampForSql($this->valueToTimestamp($expression)); } else { return parent::whereToSql($col, $sign, $expression); } }
/** * {@inheritdoc} */ public function whereToSql($col, $sign, $expression) { if ($col === 'UNIX_TIMESTAMP(sh.state_time)') { return 'sh.state_time ' . $sign . ' ' . $this->timestampForSql($this->valueToTimestamp($expression)); } elseif ($col === $this->columnMap['history']['type'] && !is_array($expression) && array_key_exists($expression, $this->types)) { return 'sh.state_type ' . $sign . ' ' . $this->types[$expression]; } else { return parent::whereToSql($col, $sign, $expression); } }