Jump to content

[SOLVED] My Rank


jaymc

Recommended Posts

SELECT username FROM table WHERE score > (SELECT score FROM table WHERE username = '$username');

 

That will pull out all records with a better score than me, but it does not return my own score which I need it to

 

Can you expand?

 

 

 

I tried this

SELECT count(*), (SELECT minutes_online_month FROM cache WHERE username = 'jaymc') as score
FROM cache
WHERE minutes_online_month > score

 

But it doesnt like the > score part and I dont want to have 3 queries in one..

Link to comment
https://forums.phpfreaks.com/topic/137952-solved-my-rank/#findComment-721506
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.