コード例 #1
0
ファイル: SignupFormGen.class.php プロジェクト: alcf/chms
    /**
     * Deletes all associated SignupEntries
     * @return void
     */
    public function DeleteAllSignupEntries()
    {
        if (is_null($this->intId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateSignupEntry on this unsaved SignupForm.');
        }
        // Get the Database Object for this Class
        $objDatabase = SignupForm::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (SignupEntry::LoadArrayBySignupFormId($this->intId) as $objSignupEntry) {
                $objSignupEntry->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`signup_entry`
				WHERE
					`signup_form_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
    }