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