Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <table style="width:100%">
- <tr>
- <th align="center">ID</th>
- <th align="center">Admin</th>
- <th align="center">Bans</th>
- <th align="center">Gags</th>
- <th align="center">Mutes</th>
- </tr>
- <?php
- error_reporting(0);
- $dbhost = 'localhost';
- $dbuser = 'sourcebans';
- $dbpass = 'sourcebans';
- $dbdb = 'sourcebans';
- $conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbdb);
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $gatherall = mysqli_query($conn,"SELECT * FROM sb_comms GROUP BY aid ASC");
- while ($res = mysql_fetch_array($gatherall)) :
- $aid = $res['aid'];
- $bid = $res['bid'];
- $name = $res['name'];
- $type = $res['type'];
- $countmutes = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='1' AND aid='$aid'");
- $mutestotal = mysqli_num_rows($countmutes);
- $countgags = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='2' AND aid='$aid'");
- $gagstotal = mysqli_num_rows($countgags);
- ?>
- <tr>
- <th><?php echo $aid;?></th>
- <th><?php echo $name;?></th>
- <th>BANS</th>
- <th><?php echo $gagstotal;?></th>
- <th><?php echo $mutestotal;?></th>
- </tr>
- <?php endwhile;?>
- </table>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement