Jump to content

linking databases to get info


shorty3

Recommended Posts

right i did this code

<table width="400" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#000000" class=thinline>
        <tr class="header" background="includes/grad.jpg">
          <td height="20" colspan="3" background="includes/grad.jpg"  class=header><div align="center" class="header">Last 10 Kills</div></td>
        </tr>
        <tr class="header" background="includes/grad.jpg"> 
          <td width="166" height="20" background="includes/gradgrey.jpg">Name</td>
          <td width="157" height="20" background="includes/gradgrey.jpg">Rank</td>
          <td width="157" height="20" background="includes/gradgrey.jpg">Killed Time</td>
        </tr>
      <?
   $c=mysql_query("SELECT * FROM attempts  WHERE outcome='Dead' ORDER BY id DESC LIMIT 10");
   while($d=mysql_fetch_object($c)){
   echo "<tr><td><a href='profile.php?viewuser=$d->target'>$d->target</a></td><td>$d->rank</td><td>$d->date</td></tr>";
   
   
   
   }
   ?>

 

but you see the

$d->rank

 

is in another database called users

 

How can i link the databases so the last 10 kills shows the users rank

 

Link to comment
https://forums.phpfreaks.com/topic/211529-linking-databases-to-get-info/
Share on other sites

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.