heshan Posted August 30, 2010 Share Posted August 30, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/ Share on other sites More sharing options...
litebearer Posted August 30, 2010 Share Posted August 30, 2010 How do you determine "for long time periods"? Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105261 Share on other sites More sharing options...
heshan Posted August 30, 2010 Author Share Posted August 30, 2010 It depends from account to account. That i do not need. I just want to delete records when he clicks on "close account" button. Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105264 Share on other sites More sharing options...
litebearer Posted August 30, 2010 Share Posted August 30, 2010 What code have you written thus far to accomplish your task? Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105265 Share on other sites More sharing options...
heshan Posted August 30, 2010 Author Share Posted August 30, 2010 sorry, i have no idea... if u can help me i will be more appreciate. Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105290 Share on other sites More sharing options...
litebearer Posted August 30, 2010 Share Posted August 30, 2010 perhaps someone in the 'freelance' section might be of help Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105399 Share on other sites More sharing options...
fortnox007 Posted August 30, 2010 Share Posted August 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105400 Share on other sites More sharing options...
PFMaBiSmAd Posted August 30, 2010 Share Posted August 30, 2010 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.) Quote Link to comment https://forums.phpfreaks.com/topic/212082-how-to-write-codings-to-close-accounts/#findComment-1105405 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.