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