/** * Deletes all associated ParentPagerIndividuals * @return void */ public function DeleteAllParentPagerIndividuals() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerIndividual on this unsaved ParentPagerHousehold.'); } // Get the Database Object for this Class $objDatabase = ParentPagerHousehold::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (ParentPagerIndividual::LoadArrayByParentPagerHouseholdId($this->intId) as $objParentPagerIndividual) { $objParentPagerIndividual->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `parent_pager_individual` WHERE `parent_pager_household_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }