bocco Posted November 9, 2008 Share Posted November 9, 2008 i have created a mod, and now i am a little lost in making a user list for the mod the mod is a special club that only members that are a 'x' level can get in and of course pay the entry free. what i need is a user list of all the members that are in the club. Can anyone help me out please. Oh the table is of course in users and is named clubakbuyin Quote Link to comment Share on other sites More sharing options...
War_Hero Posted November 9, 2008 Share Posted November 9, 2008 Re: [request] Userlist Well, I think you'd have it so that when a user does join, it will enter their name in the new 'user list' table. Then have a query selecting all data from that table to show who's in the club. :) $sql = $db->query("SELECT * FROM `tablename`") <table width = '75%' celllspacing = '1' class = 'table' /> <tr /> <th />User Name</th> <th />User Level</th> </tr>"; Then to output it while($r = $db->fetch_row($sql)) { print "<tr /> <td />{$r['clubuserNAME']}</td> <td />{$r['clubuserLEVEL']}</td> </table>"; } or something like that. :) Quote Link to comment Share on other sites More sharing options...
bocco Posted November 9, 2008 Author Share Posted November 9, 2008 Re: [request] Userlist well here is the thing, i do not want others to know they are in there the list would only be a link in the 'club' just a little more info. once you pay the fee to get in the club it sets 'clubakbuyin' to 1 so i would need the list to look for clubakbuyin >= 1 and if clubakbuyin = 1 then list username Quote Link to comment Share on other sites More sharing options...
War_Hero Posted November 9, 2008 Share Posted November 9, 2008 Re: [request] Userlist Ohhh. In which case, this is what you'd have: $sql = $db->query("SELECT * FROM `users` WHERE `clubakbuyin` >= 1"); print "<table width = '75%' cellspacing = '1' class = 'table' /> <tr /> <th />User Name</th> <th />Level</th> </tr>"; while($r = $db->fetch_row($sql)) { print "<tr /> <td />{$r['username']}<td> <td />{$r['level']}</td> </tr> </table>"; } or something on those lines. I've sent you a message with my email. ;) 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.