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