Search found 4 matches

by summertime
Thu Feb 17, 2005 10:51 am
Forum: PHP - Code
Topic: referral statistics
Replies: 6
Views: 598

how's this? SELECT COUNT(own) number_of_referrals, * FROM users GROUP BY own ORDER BY id This part of the code number_of_referrals, * gave me error - mysql_fetch_array(): supplied argument is not a valid MySQL result resource . Without it I have two rows - one small and one bigger but no data. Mari...
by summertime
Thu Feb 17, 2005 10:24 am
Forum: PHP - Code
Topic: referral statistics
Replies: 6
Views: 598

How is 'share' stored? Moved to PHP - Code. Actually I think share have nothing to do with referrals. To be more clear this is auto surf script in which I'm trying to add referral statistic. Here is the original MySQL maybe this will help you: CREATE TABLE user ( id int(11) NOT NULL AUTO_INCREMENT,...
by summertime
Thu Feb 17, 2005 10:18 am
Forum: PHP - Code
Topic: referral statistics
Replies: 6
Views: 598

Maugrim_The_Reaper wrote:

Code: Select all

for($i=0; $i<count($reported); $i++)
Where did $reported come from? Why not use $referral in count() since it actually holds the array of items?
It came form another code:P
I changed it ... still no report.
by summertime
Thu Feb 17, 2005 9:36 am
Forum: PHP - Code
Topic: referral statistics
Replies: 6
Views: 598

referral statistics

I'm complete lamer in PHP. I compilied this code from several others. I want to receive statistic about number of referrals each user have. My user table contains: id share(referrals) own(same as id) email pass credits In config.inc.php function report_ref() &#123; $result = mysql_query("SE...