ZF-10413: Wrong docs for Zend_Db_Adapter_Abstract - fetchCol() method

Description

Php comments doc in Zend_Db_Adapter_Abstract for fetchCol() method states following:


    /**
     * Fetches the first column of all SQL result rows as an array.
     *
     * The first column in each row is used as the array key.
     *
     * @param string|Zend_Db_Select $sql An SQL SELECT statement.
     * @param mixed $bind Data to bind into SELECT placeholders.
     * @return array
     */
    public function fetchCol($sql, $bind = array())

After reading description "The first column in each row is used as the array key" it's expected that this method will return first column values in array where array keys will be equal to array values:


array(
    val1 => val1,
    val2 => val2,
    val3 => val3,
...
)

But despite the description the fetchCol() method returns array indexed in natural order:


array(
    0 => val1,
    1 => val2,
    2 => val3,
...
)

I think it's better to remove "The first column in each row is used as the array key." from description (is it left from initial development?)

Comments

Patch attached.

Patch applied to trunk and 1.11 release branch -- thanks!