Jump to content

[SOLVED] How to call a field inside a different table?


Padgoi

Recommended Posts

Hey guys, I have this query that looks like this:

 

$rating = mysql_query( "SELECT member_id,field_11 FROM ibf_pfields_content ORDER BY field_11 desc" )

 

This query calls the member id and field 11 from the table ibf_pfields_content.  The problem is that member_id is just a number associated with a user.  The member_id field is EQUAL to another field in another table. In other words:

 

Table Name = ibf_pfields_content

Field name = member_id

Field name = field_11

 

Table name = ibf_members

Field name = id <b>= member_id field from ibf_pfields_content table</b>

Field name = name

 

I need to associate the member_id field from ibf_pfields_content to equal the id field from the ibf_members table and then after doing that, I need to call up the name field from the ibf_members table so that instead of showing the user id, it will show the user name. 

 

Can anyone help me with this?  I'd be very appreciative.  Thanks!

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.