Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The post title is a bit of a misnomer, but here we go.
There is an object in our database called Users. It has an ID, let's call it User_ID.
A User may refer someone else to use our application, thus creating a new user.
The actual referral is tracked in the system in a table most remarkably called 'User_Referral'. As far as this question is concerned, this table contains two user IDs, let's call them Referrer_ID and Referred_ID
My question is, how do I write a script that allows me to intelegently discuss 'Users' as an entire entity, as well as 'referrers' and those who were referred as distinct entities (bearing in mind that any given user may be either, neither or both)
I'm not sure if it's exactly what you need here, but you may want to look into a semantic load. Here's an example that tracks parent and child records.
hi,
its is a good example, but when i tried with another example it is not working.