/** * Deletes all associated UserAccountsAsModifiedBy * @return void */ public function DeleteAllUserAccountsAsModifiedBy() { if (is_null($this->intUserAccountId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateUserAccountAsModifiedBy on this unsaved UserAccount.'); } // Get the Database Object for this Class $objDatabase = UserAccount::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (UserAccount::LoadArrayByModifiedBy($this->intUserAccountId) as $objUserAccount) { $objUserAccount->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `user_account` WHERE `modified_by` = ' . $objDatabase->SqlVariable($this->intUserAccountId) . ' '); }