CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Need help with logic

Print topic Send  topic

Author Message
gulam

Posts: 55
Posted: 11/29/2011, 7:02 AM

Hi,

I am developing a membership module in CCS 4.3 but have a situation whose logic is confusing me.

This is the scenario:
Members subscribe to a health benefits scheme and can then assign 4 dependents to receive the health benefits. This is all good. At the time of registration, dependents are assigned a unique PIN number, and these details are written to the dependent table which is linked to the member table by the member's userid.

The problem comes when the member wants to change the dependents. The procedure is as follows
a) Member fills an online form to request dependent change. In this form he gives the PIN number of the old dependent which is a unique identifier of the dependent, and details of the new dependent.
b) These details are written to dependentchange table
c) Staff then look at the reason for change and approve or reject.
.
I need help to write the code that does the following:
a) On approval the old dependent in dependent table should be deactivated and new one inserted
b) This I believe will be inserted in the AFTER UPDATE code of the dependentchange table.

Any help will be appreciated.

Gulam
View profile  Send private message
girish_327


Posts: 108
Posted: 11/29/2011, 9:55 PM

Hi,
You May do this After UPDATE event. Once you approve field run your custom code which will delete or deactivate the record or update the record as per new value or you may insert new record.


_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com
View profile  Send private message
gulam

Posts: 55
Posted: 11/29/2011, 11:10 PM

Thanks Girish,

I now understand how the logic will be, I needed an example of the code that would

a) check approval field in tableA
b) If approved then
c) UPDATE tableB - change value of activation field in record where captured pin = pin, from 1 to 0
d) INSERT into tableB data from tableA

Gulam
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.