Пример #1
0
 /**
  * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
  *
  * Use this method directly if you want to work with an executed statement durirectly (for example
  * to perform your own object hydration).
  *
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  * @param      PropelPDO $con The connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  * @return     PDOStatement The executed PDOStatement object.
  * @see        BasePeer::doSelect()
  */
 public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
 {
     $con = assetPeer::alternativeCon($con);
     if ($criteria->hasSelectClause()) {
         $asColumns = $criteria->getAsColumns();
         if (count($asColumns) == 1 && isset($asColumns['_score'])) {
             $criteria = clone $criteria;
             assetPeer::addSelectColumns($criteria);
         }
     } else {
         $criteria = clone $criteria;
         assetPeer::addSelectColumns($criteria);
     }
     // Set the correct dbName
     $criteria->setDbName(self::DATABASE_NAME);
     // attach default criteria
     assetPeer::attachCriteriaFilter($criteria);
     // BasePeer returns a PDOStatement
     return BasePeer::doSelect($criteria, $con);
 }
Пример #2
0
 /**
  * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
  *
  * Use this method directly if you want to work with an executed statement durirectly (for example
  * to perform your own object hydration).
  *
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  * @param      PropelPDO $con The connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  * @return     PDOStatement The executed PDOStatement object.
  * @see        BasePeer::doSelect()
  */
 public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
 {
     $con = assetPeer::alternativeCon($con);
     $criteria = assetPeer::prepareCriteriaForSelect($criteria);
     // BasePeer returns a PDOStatement
     return BasePeer::doSelect($criteria, $con);
 }