Exemple #1
0
 public static function getFiles($entry_id, $idS)
 {
     $C = new Criteria();
     $C->addJoin(self::ID, AppBlogMultimediaEntriesPeer::ENTRIES_ID);
     $C->addJoin(AppBlogMultimediaEntriesPeer::MULTIMEDIA_ID, AppBlogsMultimediaPeer::ID);
     $C->add(self::ID, $entry_id);
     return AppBlogsMultimediaPeer::doSelect($C);
 }
Exemple #2
0
 public function getImages()
 {
     $C = new Criteria();
     $C->addJoin(AppBlogsEntriesPeer::ID, AppBlogMultimediaEntriesPeer::ENTRIES_ID);
     $C->addJoin(AppBlogsMultimediaPeer::ID, AppBlogMultimediaEntriesPeer::MULTIMEDIA_ID);
     $C->add(AppBlogsEntriesPeer::ID, $this->getId());
     $RS = AppBlogsMultimediaPeer::doSelect($C);
     if (empty($RS)) {
         return false;
     } else {
         return $RS;
     }
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(AppBlogsMultimediaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(AppBlogsMultimediaPeer::DATABASE_NAME);
         $criteria->add(AppBlogsMultimediaPeer::ID, $pks, Criteria::IN);
         $objs = AppBlogsMultimediaPeer::doSelect($criteria, $con);
     }
     return $objs;
 }