Search code examples
phpsymfony1doctrinesymfony-1.4propel

Propel - fetchArray or toArray


In Doctrine i can use function fetchArray() instead of execute or toArray(). I can't founded equivalent these function for Propel. Is this possible?


Solution

  • if you really need array you can always use old Peer API

    $criteria = new Criteria();
    /* ...setup your criteria... */
    $pdoStatement = AuthorPeer::doSelectStmt($criteria);
    $array = $pdoStatement->fetchAll(PDO::FETCH_ASSOC);