Thread: Invites
View Single Post
  #2  
Old 28th February 2014, 18:11
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by Catralkid View Post
Hi,

Is there any way of getting a list of members for my site and how many invites that they have. V 7.2
Try this but it might not work

Code:
 <?

 include "include/ts_functions.php";

  if (isset($_GET["action"])){$lim = $_GET["action"];}else{$lim = "10";} 

$result = sql_query("SELECT * FROM users ORDER BY class DESC,invites LIMIT 10");

echo "<table width='100%' cellspacing='4' cellpadding='4'>
<tr>
<th>name</th>
<th>Registered</th>
<th>Last Login</th>
<th>Last Access</th>
<th>invite</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['username'] . "</td>";
  echo "<td>" . $row['added'] . "</td>";
  echo "<td>" . $row['last_login'] . "</td>";
  echo "<td>" . $row['last_access'] . "</td>";
  echo "<td>" . $row['invites'] . "</td>";
  echo "</tr>";
  }
Or try this

Code:
 if (isset($_GET["action"])){$lim = $_GET["action"];}else{$lim = "10";}
 
$db=mysqli_connect("localhost","root","PASSWORD","DB_NAME");  
  $result = mysqli_query($db,"SELECT * FROM users ORDER BY class DESC,invites LIMIT $lim");

echo "<table width='100%' cellspacing='4' cellpadding='4'>
<tr>
<th>name</th>
<th>Registered</th>
<th>Last Login</th>
<th>Last Access</th>
<th>invites</th>
</tr>";

while($row = mysqli_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['username'] . "</td>";
  echo "<td>" . $row['added'] . "</td>";
  echo "<td>" . $row['last_login'] . "</td>";
  echo "<td>" . $row['last_access'] . "</td>";
  echo "<td>" . $row['invites'] . "</td>";
  echo "</tr>";
  }
echo "</table>";
remember if you are going to use the second one, you will need to add your db info

If you want more results then do the following..

Code:
/filename.php?action=1000
and change the number to how many you wont all just add the TS7.2 pager function
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
Marco (30th March 2014)