Thread: Function Help
View Single Post
  #7 (permalink)  
Old 04-22-2008, 11:10 PM
Whitey's Avatar   
Whitey Whitey is offline
Programming Professional
 
Join Date: Feb 2008
Location: Loveland, Colorado
Posts: 225
Credits: 0
Rep Power: 7
Whitey has a spectacular aura aboutWhitey has a spectacular aura aboutWhitey has a spectacular aura about
Send a message via AIM to Whitey Send a message via MSN to Whitey Send a message via Skype™ to Whitey
Default Re: Function Help

Okay there is a Mysql DATABASE
with 2 Tables
1 is GamesPlayed
another is Members

In games played there are the following fields:
id
gamename
gamepic
statnames
outsidelink

In Members there the following fields:

ID
Username
Password
maingame

The main game field is an ID from the GamesPlayed Table..

So..
there are 5 members lets say
and there are 3 games..
and its filled out like this

ID: 1
Username: Joe
Password: test
maingame: 1

ID: 2
Username: Bob
Password: test
maingame: 1

ID: 3
Username: kiddney
Password: test
maingame: 3

ID: 4
Username: sally
Password: test
maingame: 1

ID: 5
Username: sid
Password: test
maingame: 2

now i am trying to write a function that that pulls out the ID number from the Members page of each members and counts them.
So it should return
Main Game: 1 Members = 3
Main Game: 2 Members = 1
Main Game: 3 Members = 1
Reply With Quote