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:

http://gyazo.com/e2ce3d53698fef66bc18a0ea9ce84756.png

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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -