daveoffy Posted December 19, 2008 Share Posted December 19, 2008 On the index page I want it to display the 4 newest members (find out by member_id in `members`) I just need to know the outline like if(x <=3){ } or whatever the code is but don't need any echos or anything and I can figure it out from there. Link to comment https://forums.phpfreaks.com/topic/137684-solved-4-newest-members/ Share on other sites More sharing options...
ILMV Posted December 19, 2008 Share Posted December 19, 2008 SELECT * FROM members LIMIT 4 ORDER BY date_registered ASC You need to use a query like this, I cannot remember is it is ASC of DESC, but try both ILMV Link to comment https://forums.phpfreaks.com/topic/137684-solved-4-newest-members/#findComment-719575 Share on other sites More sharing options...
daveoffy Posted December 19, 2008 Author Share Posted December 19, 2008 SELECT * FROM members LIMIT 4 ORDER BY date_registered ASC You need to use a query like this, I cannot remember is it is ASC of DESC, but try both ILMV I am 98% sure it is DESC. Thanks I will try this in like 1 second. Link to comment https://forums.phpfreaks.com/topic/137684-solved-4-newest-members/#findComment-719577 Share on other sites More sharing options...
daveoffy Posted December 19, 2008 Author Share Posted December 19, 2008 I had to do this instead because the other one wouldn't work SELECT * FROM members ORDER BY date_registered DESC LIMIT 4 Link to comment https://forums.phpfreaks.com/topic/137684-solved-4-newest-members/#findComment-719591 Share on other sites More sharing options...
ILMV Posted December 19, 2008 Share Posted December 19, 2008 Fair point! Happy Christmas Link to comment https://forums.phpfreaks.com/topic/137684-solved-4-newest-members/#findComment-719595 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.