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