Mark Fondy Mark Fondy - 8 months ago 51
PHP Question

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?

Answer

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);