PakiGangsta Posted December 29, 2006 Share Posted December 29, 2006 Ok i am trying to add latest 10 members registered and get figure out how would i grab the infromation. Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/ Share on other sites More sharing options...
trq Posted December 29, 2006 Share Posted December 29, 2006 You will need a timestamp in your database which needs to be updated when users join, then a simple query allong the lines of....[code]SELECT username FROM users ORDER BY timestamp DESC LIMIT 10;[/code] Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149218 Share on other sites More sharing options...
PakiGangsta Posted December 29, 2006 Author Share Posted December 29, 2006 alright that works but only display one usernaem Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149220 Share on other sites More sharing options...
trq Posted December 29, 2006 Share Posted December 29, 2006 Post your code. Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149221 Share on other sites More sharing options...
PakiGangsta Posted December 29, 2006 Author Share Posted December 29, 2006 [code] $forumselect1="SELECT username FROM user ORDER BY regtime DESC LIMIT 10 ASC"; $forumselect2=mysql_query($forumselect1); while($getuser3=mysql_fetch_array($forumselect2)) {echo "<br>$getuser3[username]<br>";}[/code] Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149222 Share on other sites More sharing options...
trq Posted December 29, 2006 Share Posted December 29, 2006 [code=php:0]$forumselect1="SELECT username FROM user ORDER BY regtime DESC LIMIT 10";[/code]PS; You really should check your query works before trying to use any results from it. Your app stands a good chance of falling appart otherwise. Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149224 Share on other sites More sharing options...
PakiGangsta Posted December 29, 2006 Author Share Posted December 29, 2006 thanks man solved problem Link to comment https://forums.phpfreaks.com/topic/32155-i-need-help-on/#findComment-149227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.