Ejemplo n.º 1
0
 public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
 {
     $criteria = clone $criteria;
     $criteria->clearSelectColumns()->clearOrderByColumns();
     if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
         $criteria->addSelectColumn(nahoWikiPagePeer::COUNT_DISTINCT);
     } else {
         $criteria->addSelectColumn(nahoWikiPagePeer::COUNT);
     }
     foreach ($criteria->getGroupByColumns() as $column) {
         $criteria->addSelectColumn($column);
     }
     $criteria->addJoin(nahoWikiPagePeer::WIKI_ID, nahoWikiWikiPeer::ID);
     $rs = nahoWikiPagePeer::doSelectRS($criteria, $con);
     if ($rs->next()) {
         return $rs->getInt(1);
     } else {
         return 0;
     }
 }
 public static function doSelect(Criteria $criteria, $con = null)
 {
     return nahoWikiPagePeer::populateObjects(nahoWikiPagePeer::doSelectRS($criteria, $con));
 }