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!

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.