public function apply(Statsomatic_Query $q) { $valueColumn = $this->variable->getValueColumn(); $qDetail = $q->subSelect(); $qDetail->from($q->nextDetailsAlias())->select($q->detailColumn('entry_id'))->where($q->expr->eq($q->detailColumn('provider'), $q->bindValue($this->variable->getProvider(), null, PDO::PARAM_STR)), $q->expr->eq($q->detailColumn('variable'), $q->bindValue($this->variable->getName(), null, PDO::PARAM_STR)), $q->expr->{$this->comperator}($q->detailColumn($valueColumn), $q->bindValue($this->value, null, $this->variable->getPdoType()))); $q->where($q->expr->in($q->mainColumn('entry_id'), $qDetail)); }
public function apply(Statsomatic_Query $q) { $q->where($q->expr->{$this->comperator}($q->mainColumn($this->variable->getColumnName()), $q->bindValue($this->value, null, $this->variable->getPdoType()))); }