Osama Bari

Osama Bari

  • NA
  • 1
  • 1.1k

How to how knwo number of team members? using PHP/MYSQL

Dec 27 2014 2:03 PM
want to know total team members from a table. the calculation formula is: suppose total team is 15 team

Team A
team B=2
team C=2
Team D (those parent is B )=6
Team E those parent is C)=5
and Total Team A=15
Team B=8
Team C=7


how can calculate it.

table structure

uid
uname
uemail
usid (user parent id)
 
 
 
formula
 
when user B (uid) Added in this table then parent user A is automatically Added in usid column.
example
maria(uid=5) join via jon(uid=2) then

 uid uname uemailusid 
 5 maria [email protected] 2