Jump to content

Data output order


EchoFool

Recommended Posts

Hey need some help guys and gals.

 

Just wondering how do i while loop data in order of word rankings.. for example... say "Leader" becomes before "Co-Leader".

 

I have the rankings in the field rank. But i was unsure how to make it a list of words.

 

This is what i put in my Select:

 

<?php
$Get = mysql_query("SELECT UserID,Rank FROM gangmembers WHERE GangID='$GangID' ORDER BY Rank='Leader',Rank='Co-Leader'")
Or die(mysql_error());
While($row = mysql_fetch_assoc($Get)){
$Rank = $row['Rank'];
$UserID = $row['UserID'];
?>
<tr>
<td width="200" align="center" class="blackBold"><?php echo $UserID;?></td>
<td width="200" align="center" class="blackBold"><?php echo$Rank;?></td>
<td width="200" align="center" class="blackBold"><a href="ganghq.php?team&fire=<?=$RecordID?>">Fire</a></td>
</tr>
<?php
	}
}
?>

 

Sadly it does not work though :(. Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/118853-data-output-order/
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.