コード例 #1
0
    /**
     * Deletes all associated ParentPagerChildHistoriesAsDropoffBy
     * @return void
     */
    public function DeleteAllParentPagerChildHistoriesAsDropoffBy()
    {
        if (is_null($this->intId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateParentPagerChildHistoryAsDropoffBy on this unsaved ParentPagerIndividual.');
        }
        // Get the Database Object for this Class
        $objDatabase = ParentPagerIndividual::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (ParentPagerChildHistory::LoadArrayByDropoffByParentPagerIndividualId($this->intId) as $objParentPagerChildHistory) {
                $objParentPagerChildHistory->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`parent_pager_child_history`
				WHERE
					`dropoff_by_parent_pager_individual_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
    }