Jump to content

how to write codings to close accounts


heshan

Recommended Posts

Hi guys,

 

This is very important. The supervisor of my system wants to close accounts which contain zero balances for long time periods.

 

There is a separate page contains ID and Account Number.This is included in a form and a "close account" button is there.

 

When he clicks on that button the relevant record should be deleted from all tables which include that ID.

 

The table structure looks like this. There are 4 account types which contain same fields.

 

savings_investment(ID,account_type,full_name_balance,interest,customer_id)

 

I want full coding of this scenario.

 

Thanks,

Heshan

 

 

Link to comment
https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/
Share on other sites

Well first of all you can try and look a bit further on how to deleted rows from a table at the front end. But I would be quite precise if I were you, customers are customers, and you don't want to offend them. Anyway, a nice query with a "where clause" Put that all in a loop, which  echo's out the customers that have a zero balances with a check box, with the value of the Id of the customer. I am pretty sure you can find this around here since I saw it 1 week ago.

In real applications, especially involving money, data is never actually deleted (unless whoever assigned this to you wanted to see if you could research, define, and create code to actually delete the correct records.)

 

You would normally just mark accounts as closed in a status field and not include them in any active queries (except in a list of closed accounts.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.