This probably should be the most impossible task to request from anyone on this website.. Any help will be appreciated..
See, i have two tables.... AGENT and USERS
Table AGENT:
id,agency (ID is the unique key, table contains more datas including name,address and so on)
Table USERS
id,agency (ID is the unique key, table contains more datas including name,address and so on)
What i want to do is i want to achieve an admin panel where i can view the following..
NORMAL HTML TABLE ===
name of agency| Number of clients |
result1 total
result2 total
result3 total (and so on)
The thing is... Each users(clients) has a field called AGENCY whose values are same with the referring AGENT's agency..
I was hoping to get an SQL statement to satisfy my need and how to use PHP's repeat region to populate the results.... I use Macromedia Dreamweaver and i am more of a google aided programmer(ROOKIE)
Any help at all will do..