I have been trying to play around with this referrer stuff myself, and was wondering:
How difficult would it be to add a user field to the table that keeps track of a user's # of referrals, in addition to keeping track of "who referred who" like it does now?
I would like to be able to add a "Referrals" column to, for example, the Member Listing, without having to loop through the list for each user to see who referred who. Also, I would like to be able to sort the Member Listing based on # of referrals, which I have not been able to do so far (without an absolutely ludicrous amount of database queries). My goal in this regard is strictly numeric; the system already keeps track of who referred who, so all I am looking for a single numeric field that is incremented, say, when somebody registers.
I know you can add fields using the ALTER command though I know very little about it and don't want to screw anything up. It does seem that once a field like that was added, putting the rest together would be very easy.
Am I wrong, or would this be a relatively easy hack?
|