/** * Deletes an associated ParentPagerAttendantHistory * @param ParentPagerAttendantHistory $objParentPagerAttendantHistory * @return void */ public function DeleteAssociatedParentPagerAttendantHistory(ParentPagerAttendantHistory $objParentPagerAttendantHistory) { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerAttendantHistory on this unsaved ParentPagerIndividual.'); } if (is_null($objParentPagerAttendantHistory->Id)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerAttendantHistory on this ParentPagerIndividual with an unsaved ParentPagerAttendantHistory.'); } // Get the Database Object for this Class $objDatabase = ParentPagerIndividual::GetDatabase(); // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `parent_pager_attendant_history` WHERE `id` = ' . $objDatabase->SqlVariable($objParentPagerAttendantHistory->Id) . ' AND `parent_pager_individual_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); // Journaling if ($objDatabase->JournalingDatabase) { $objParentPagerAttendantHistory->Journal('DELETE'); } }