2

You can add "DISTINCT" with the distinct() method. But is there any way to remove it after it is added?

Buttle Butkus
  • 9,206
  • 13
  • 79
  • 120

1 Answers1

4

The distinct method accepts a parameter $flag(bool). Setting it to false will disable the distinct from the query. Check

Zend/Db/Select.php Line 192

/**
     * Makes the query SELECT DISTINCT.
     *
     * @param bool $flag Whether or not the SELECT is DISTINCT (default true).
     * @return Zend_Db_Select This Zend_Db_Select object.
     */
    public function distinct($flag = true)
    {
        $this->_parts[self::DISTINCT] = (bool) $flag;
        return $this;
    }

NB This is for Zend 1.12

Nandakumar V
  • 4,317
  • 4
  • 27
  • 47