Jump to content

Getting information from multiple tables...


Jim R

Recommended Posts

I searched, but I rarely can make much of other people's problems when it comes to databases and PHP.  Here is what I'm trying to do:

 

I have a datatable full of names of basketball players.  I have a datatable that is going to store links to videos to basketball players.  Here is the query I have:

 

$query = 'SELECT pr.*,v.*
		 FROM (wp_playerRank) as pr, (hhr_video) as v
		 WHERE pr.nameFirst = v.name_first
		 AND pr.nameLast = v.name_last
		 ORDER BY v.id_vid DESC';
$results = mysql_query($query);
while($line = mysql_fetch_assoc($results))

 

There might be four or five video clips, as we start to compile this list over time.  I want to echo information from the hhr_video table.  I'm assuming with a FOREACH loop.

 

Right?

 

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.