[Ban Count] RevCMS Staff Page.

Whip

- FiveM Server Developer -
Nov 6, 2013
408
46
Hey Guys,
I don't normally ask for much help but "Google" has not been much help with this i know the answer would be something super basic but anyways i'm wanting to add the ban count to my hotel's staff page so something like most hotels have not telling you how many people that certain staff member have banned would be great help thankyou :)
 

Marlboro20

Member
Dec 17, 2013
37
6
Here are two ways you could do it. This uses PhoenixDB i am not sure what database you use.
PHP:
<?php
    /**
    *    Replace {staff_username} with the staffs username
    */
     
    # First Option
   
    $banCount = $engine->result('SELECT COUNT(*) FROM bans WHERE added_by = \'{staff_username}\';');
   
    echo 'Staff Member {staff_username} has banned ', $banCount, ' members';
   
    # Second Option
    $banCount = $engine->num_rows('SELECT id FROM bans WHERE added_by = \'{staff_username}';\');
   
    echo 'Staff Member {staff_username} has banned ', $banCount, ' members';
 

Users who are viewing this thread

Top