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