elementz Posted July 24, 2006 Share Posted July 24, 2006 How do I show the newest ten table rows added to a MySQL database so I can show the 10 newest signed members that have signed up. Also how do I show the top ten points scored out of the members when one of the table rows is points. Please help me :DThankyou,Luke Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 24, 2006 Share Posted July 24, 2006 Example:[code]SELECT * FROM members ORDER BY id DESC LIMIT 10[/code] Quote Link to comment Share on other sites More sharing options...
elementz Posted July 24, 2006 Author Share Posted July 24, 2006 [quote author=hackerkts link=topic=101649.msg402431#msg402431 date=1153740371]Example:[code]SELECT * FROM members ORDER BY id DESC LIMIT 10[/code][/quote]Does that get the 10 most newest members? also how do I get them by top ten points, say the points row is called points, how do I get the top ten members with the highest points? Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 24, 2006 Share Posted July 24, 2006 Can you post your table structure ? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 24, 2006 Share Posted July 24, 2006 Use this quewry:[code]SELECT * FROM members ORDER BY points_col ASC LIMIT 10[/code]Change points_col to the name of you field that stores the points, it fetches the top tend highest scores from the database. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.