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