/** * Deletes all associated ParentPagerAttendantHistories * @return void */ public function DeleteAllParentPagerAttendantHistories() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerAttendantHistory on this unsaved ParentPagerStation.'); } // Get the Database Object for this Class $objDatabase = ParentPagerStation::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (ParentPagerAttendantHistory::LoadArrayByParentPagerStationId($this->intId) as $objParentPagerAttendantHistory) { $objParentPagerAttendantHistory->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `parent_pager_attendant_history` WHERE `parent_pager_station_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }