Codice PHP:
SELECT COUNT(referral_idFROM members WHERE referral_id=admin 

admin è il nome utente con il quale solo loggato.

Vedi che è strano?