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