i have two tables one is Referal table that holds info on the
referal_id,amount,position_id,referalParent_id,etc and ReferalApplied
table contains referalApplied id ,status,and referal_id which is
pointing to the Referal.referal_id.
here am implementing the Referral process code.
when ever that referal send a referal mail to the JobApplicant say A,
that data stored in the first table. for this id am maintaing
referalparent_id as the id of the referal who has sent mail to him,and
only for first time referal mail am adding the amount in the DB.
if this A is sending referal mail to some other jobApplicant say B,