View Single Post
Author Message
sixten_8_9@
Senior Member
Join Date: Jun 2009
Location: Sweden
Old 11-29-2018 , 09:12   Need help with (!Website)
Reply With Quote #1

Need help with this code i want to add the Players name
now it say this:Last Kill 1:034 AM, Thu. Nov. 29, 2018

PHP Code:
<?php
        printSectionTitle
('General Statistics');
        
        
$nonhiddengamestring preg_replace('/,$/'')'$nonhiddengamestring);
        
        
$result $db->query("SELECT COUNT(playerId) FROM hlstats_Players WHERE game IN $nonhiddengamestring");
        list(
$num_players) = $db->fetch_row($result);
        
$num_players number_format($num_players);

        
$result $db->query("SELECT COUNT(clanId) FROM hlstats_Clans WHERE game IN $nonhiddengamestring");
        list(
$num_clans) = $db->fetch_row($result);
        
$num_clans number_format($num_clans);

        
$result $db->query("SELECT COUNT(serverId) FROM hlstats_Servers WHERE game IN $nonhiddengamestring");
        list(
$num_servers) = $db->fetch_row($result);
        
$num_servers number_format($num_servers);
        
        
$result $db->query("SELECT SUM(kills) FROM hlstats_Servers WHERE game IN $nonhiddengamestring");
        list(
$num_kills) = $db->fetch_row($result);
        
$num_kills number_format($num_kills);

        
$result $db->query("
            SELECT 
                eventTime
            FROM
                hlstats_Events_Frags
            ORDER BY
                id DESC
            LIMIT 1
        "
);
        list(
$lastevent) = $db->fetch_row($result);
?>

<?php
        
if ($lastevent)
        {
            echo 
"\t\t\t\t<li>Last Kill <strong> " date('G:i:s A, D. M. d, Y'strtotime($lastevent)) . "</strong></li>";
        }
?>
__________________
My Nick name is Nouton^
i have played cs for around 12years+
have build servers for about 12years
my website and my servers are: http://Nouton.se

i host at home did build my own server station for around 1300$.

Last edited by sixten_8_9@; 11-29-2018 at 09:14.
sixten_8_9@ is offline