/** * Deletes all associated Transactions * @return void */ public function DeleteAllTransactions() { if (is_null($this->intTransactionTypeId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTransaction on this unsaved TransactionType.'); } // Get the Database Object for this Class $objDatabase = TransactionType::GetDatabase(); // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `transaction` WHERE `transaction_type_id` = ' . $objDatabase->SqlVariable($this->intTransactionTypeId) . ' '); }