...

View Full Version : RESOLVED query position numbers?



seco
12-19-2010, 12:11 AM
So my question is, Im querying out a mysql while loop, the most basic


select * from rank order by score DESC

In the loop is it possible to have each row show its position by number next to it, like an ordered list but not in a ordered list?

example

234213 position 1
123232 position 2
99322 position 3

etc

thanks

EDIT ok it was easy



<?php
//Dynamically creating # per row result withing a while loop
$counter ++;
echo $counter;
?>

durangod
12-19-2010, 01:02 AM
if you echo the value of (i) each time i wonder if that would work or is that not deep enough, would you need to show where element pointer is?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum