nycsavage Posted April 19, 2008 Share Posted April 19, 2008 I have a database called users I have obvious tables ID Name Age Referral Location Basically, I was looking for a code that would count how many times user a has referred someone, user b etc Then I would like a running total saying user a has x referrals, user b has x referrals etc Finally, I would like this display as a top 2 on my website. I know it probably sounds easy (if I was coding in .net id have it done by now lol) but with php im a noob im afraid. Can anyone help? Thank you Link to comment https://forums.phpfreaks.com/topic/101915-i-need-help-with-count-code/ Share on other sites More sharing options...
discomatt Posted April 19, 2008 Share Posted April 19, 2008 This is more an SQL issue than a PHP one.. Just to confirm... do you want it to just show how many direct referrals? Or do you want to show the referral's referrals... ect... ect? Link to comment https://forums.phpfreaks.com/topic/101915-i-need-help-with-count-code/#findComment-521589 Share on other sites More sharing options...
nycsavage Posted April 19, 2008 Author Share Posted April 19, 2008 How many referrals sign up to user a, how many to user b, user c etc Then to show a table of the top 2 referrers (amounts of people who have referred the most amount of people) Thanks Link to comment https://forums.phpfreaks.com/topic/101915-i-need-help-with-count-code/#findComment-521618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.