Welcome Guest, Not a member yet? Register   Sign In
Software Design Problem: VPN Accounts
#4

[eluser]n0xie[/eluser]
For your first problem finding what subscription a certain client is currently using, would be a simple query finding where the current date is between the start_date and end_date. Not really a very heavy query and one you could either cache or use a view for (showing for every customer/client the 'current' subscription details).

If he wants to change the service, the same applies. Get the row where the current subscription resides and just change the subscription_type. If you are normalising your DB you probably have a table subscription_type (with an associated cost etc.). Changing the type would automatically change the subscription cost etc.


Messages In This Thread
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 05:32 AM
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 06:07 AM
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 06:26 AM
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 06:43 AM
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 07:02 AM
Software Design Problem: VPN Accounts - by El Forum - 08-04-2010, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB