PHP/MySQL - Rank on Inner Join -
my query @ moment:
select * posts p inner join users u on p.author = u.uid inner join usergroups ug on u.usergroup = ug.gid tid_parent = ?
this query, example provide following data:
i'd rank beside these (using @currank := @currank + 1 rank maybe).
when looping out table keep count , print count value rank
$c=1; foreach($results $result){ //all table row html echo $c; //all rest of table row html $c++; }
Comments
Post a Comment