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 Link to comment https://forums.phpfreaks.com/topic/15470-how-to-get-the-newest-info-inputed-into-mysql/ 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] Link to comment https://forums.phpfreaks.com/topic/15470-how-to-get-the-newest-info-inputed-into-mysql/#findComment-62742 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? Link to comment https://forums.phpfreaks.com/topic/15470-how-to-get-the-newest-info-inputed-into-mysql/#findComment-62746 Share on other sites More sharing options...
hackerkts Posted July 24, 2006 Share Posted July 24, 2006 Can you post your table structure ? Link to comment https://forums.phpfreaks.com/topic/15470-how-to-get-the-newest-info-inputed-into-mysql/#findComment-62748 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. Link to comment https://forums.phpfreaks.com/topic/15470-how-to-get-the-newest-info-inputed-into-mysql/#findComment-62761 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.