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?

 

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.