示例#1
0
 function deleteEntryByIdAndOwner($iId, $iOwner, $isAdmin)
 {
     if ($iRet = parent::deleteEntryByIdAndOwner($iId, $iOwner, $isAdmin)) {
         $this->query("DELETE FROM `" . $this->_sPrefix . "participants` WHERE `id_entry` = {$iId}");
         $this->deleteEntryMediaAll($iId, 'images');
         $this->deleteEntryMediaAll($iId, 'videos');
         $this->deleteEntryMediaAll($iId, 'sounds');
         $this->deleteEntryMediaAll($iId, 'files');
     }
     return $iRet;
 }
示例#2
0
 function deleteMediaFile($iMediaId, $sMediaType)
 {
     $aEntries = $this->getAll("SELECT `entry_id` FROM `" . $this->_sPrefix . $this->_sTableMediaPrefix . "{$sMediaType}` WHERE `media_id` = '{$iMediaId}'");
     if (parent::deleteMediaFile($iMediaId, $sMediaType)) {
         $this->query("DELETE FROM `" . $this->_sPrefix . "customers` WHERE `file_id` = {$iMediaId}");
         if ($aEntries) {
             foreach ($aEntries as $r) {
                 $this->updatePriceRange($r['entry_id']);
             }
         }
         return true;
     }
     return false;
 }