close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

MySQL language help needed

Thread began 4/15/2009 9:31 am by mustang_sally_85344510 | Last modified 4/17/2009 7:29 am by mustang_sally_85344510 | 2491 views | 5 replies


MySQL language help needed

I'm working in DW3, and using PHP format for my database driven site.
The site draws on the database for points that have been inserted into the database.

What I am trying to accomplish is total the points by player_Id, and post their lastname, firstname, and rank it according to sum(points) in descending order.

My queery below, brings up the information I want...
But I just can't seem to come up with the right syntex to use to count() the records.

What happens is it ends up counting how many records it took to make the sum(points).

Here is the code I use to total the points. everything but the count is added.

SELECT sum(points) as 'points', lastname, firstname, player_id
FROM points
WHERE month = '02'
GROUP BY player_id
ORDER BY sum(points) desc LIMIT 0, 200

here is a link to the working page.

I just need some help getting the darn thing to "count" records so I can use it for the "rank". For example next to the player_id ...I need to add a "rank" column, which would go from 1 to 200.

Any help would be deeply appreciated!

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...