|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Listing top 10 members from database
I want to list my site's top 10 members with their points.
I'm using PMachine weblog script. This script is logging comment and entry totals of members in database. In the database's "pm_members" table there are these fields; signature = Members name numentries = Member's total entries number numcomments = Member's total comments number Is there a way to use these values to give a member as points? I mean like: 1 entry = 3 points 1 comment = 1 point And I want to calculate member's point from addition of these points. Then list it as Top 10 users on main page. I hate to say I have no php experience to do that. I think I need a database query with limit 10 and with sorting function. I need a php code doing that. Anyone can provide that code here? Thanks by now... |
|
#2
|
|||
|
|||
|
RE: Listing top 10 members from database
here's the query:
SELECT signature, ((numentries * 3) + numcomments) AS score FROM pm_members ORDER BY score DESC LIMIT 10 read up over here: http://codewalkers.com/tutorials.php for how to query databases, etc... |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Listing top 10 members from database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|