MySQL Join

Hey!

I hope to find someone who can help me with a join question. I just can't figure it out.

I have (among others) three tables in the database "CastControl".

They are named "cc_users", "cc_plan" and "cc_servers".

In cc_users, (among others) is a row named "username" and another named "credits".
In cc_plans, (among others), is a row named "price" and another named "id"
In cc_servers, (amon others), is a row named "portbase" and anothe named "plan".

I need to ask the database for cc_server.portbase and the get the values for cc_users.credit, cc_users.owner and cc_plans.cost

The relations (as I know them) are the following:

cc_users.username relates to cc_servers.owner
cc_servers.plan relates to cc_plans.id

cc_plans have no relations to cc_users or vice versa.

I hope I can make myself understood with this. If there is anything you need to know in order to assist me. please don't hesitate to ask.
I just have no clue of have to get out the values.

If you need to see the structure of the tables, see the following files:

http://dev.gate5.se/cc_plans.txt
http://dev.gate5.se/cc_users.txt
http://dev.gate5.se/cc_servers.txt

your description was a little out of whack with fieldnames and such, but I think this is what you want. substitute a value for the '?'

select 
  u.credits, 
  u.username,
  p.cost
from
  cc_servers s
  join cc_plans p on s.plan = p.id
  join cc_users u on s.owner = u.username
where
  s.portbase = ?