Horde_Db_Adapter_Pdo_Base::selectAll PHP Method

selectAll() public method

Returns an array of record hashes with the column names as keys and column values as values.
public selectAll ( string $sql, mixed $arg1 = null, string $arg2 = null )
$sql string
$arg1 mixed Either an array of bound parameters or a query name.
$arg2 string If $arg1 contains bound parameters, the query name.
    public function selectAll($sql, $arg1 = null, $arg2 = null)
    {
        $stmt = $this->execute($sql, $arg1, $arg2);
        if (!$stmt) {
            return array();
        }
        $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
        // Required to really close the connection.
        $stmt = null;
        return $result;
    }