Hey guys,
My step is like this.
Databse 1 holds the user name, there picture, there rank, and info about them.
databse 2 hold all ranks (just the names like commander and peeon) along with a number value (commander=1 peeon=15)
What i want is to have a sorting by the rank (the highest rank being @ top).
Here is what i have so far
<?php
include 'mysql1.php';
$query='SELECT username, rank, picture_file, about_me from users';
$result=mysql_query($query, $db);
if(!$result)die('unable to process the request, please let the site administration know :' .mysql_error());
while ($row = mysql_fetch_array($result)) {
echo '<table width="690" border="1" cellpadding="0" cellspacing="0" align="center">';
echo '<tr>';
echo '<td width="139" rowspan="2" valign="top"><img src="'.$row[2].'" width="139" height="153"/></td>';
echo '<td width="276" height="35" valign="top">Name: ' .$row[0].' </td>';
print '<td width="275" valign="top">Rank: ' .$row[1].' </td>';
echo '</tr>';
echo '<tr>';
echo '<td height="102" colspan="2" valign="top">' .$row[3].' </td>';
echo '</tr>';
echo '<tr>';
echo '<td height="1"></td>';
echo '<td></td>';
echo '<td></td>';
echo '</tr>';
echo '</table>';
echo '<p> </p>';
}
mysql_close($db);
Can ya help out?
I'm stuck on how to intergrate the number field from databse2 into the query from data base 1. Honestly I have no clue how to get it done. SHould i just add a number field to database one?