Jump to content

Can I order a DB search by two factors?


refiking

Recommended Posts

I am running a script that checks returns the records in a table by the rank descending down.  But, when there are 2 people with the same rank, how can I get it to show me the first record with that rank?  Here is the snippet:

 

<?
include 'cont.php';
$result = mysql_query("SELECT tag FROM recruits ORDER BY rank DESC");
while($row = mysql_fetch_array($result))
  {
  $tag = $row['tag'];
?><font color="silver">
<strong><?echo $tag."<br>";}?></strong></font>
</td></table>
</body>

Link to comment
https://forums.phpfreaks.com/topic/97303-can-i-order-a-db-search-by-two-factors/
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.