/** * Deletes all associated GroupRegistrationses * @return void */ public function DeleteAllGroupRegistrationses() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateGroupRegistrations on this unsaved SourceList.'); } // Get the Database Object for this Class $objDatabase = SourceList::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (GroupRegistrations::LoadArrayBySourceListId($this->intId) as $objGroupRegistrations) { $objGroupRegistrations->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `group_registrations` WHERE `source_list_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }