Getting rank of a user in mysql table

Codes here !

Moderators: macek, egami, gesf

mygreenservers
New php-forum User
New php-forum User
Posts: 1
Joined: Fri Dec 27, 2013 11:19 pm

Getting rank of a user in mysql table

Postby mygreenservers » Fri Dec 27, 2013 11:41 pm

Hello,
I am a bit new in php. I have a table called "enrollement" which contains subjects and scores of students.

some of the table data look like this
John Mathematics 70
Peter Mathematics 87
James Mathematics 55

I want to get the rank from the table for a particular student and I want the rank to be in the form 1st 2nd 3rd, etc

Pls help me out

Return to “mySQL & php coding”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests