За последние 24 часа нас посетили 20740 программистов и 1111 роботов. Сейчас ищут 348 программистов ...

простой php для подсчета строк sql

Тема в разделе "Сделайте за меня", создана пользователем ZION3312, 9 фев 2021.

  1. ZION3312

    ZION3312 Активный пользователь

    С нами с:
    9 ноя 2016
    Сообщения:
    14
    Симпатии:
    0
    Народ привет. Как сделать такую штуку как на скриншоте, для подсчета.
    Нужен простой отдельный php файлик, который сам подключится к БД и выполнит все нужное и выведет цифорки.

    Код (Text):
    1. CREATE TABLE IF NOT EXISTS `ga_servers` (
    2. `id` int(11) NOT NULL,
    3.   `status` int(11) NOT NULL,
    4.   `moderation` int(11) NOT NULL,
    5.   `id_user` int(11) NOT NULL,
    6.   `game` varchar(255) NOT NULL,
    7.   `ip` varchar(255) NOT NULL,
    8.   `port` varchar(255) NOT NULL,
    9.   `hostname` varchar(300) DEFAULT NULL,
    10.   `map` varchar(300) DEFAULT NULL,
    11.   `players` int(11) DEFAULT NULL,
    12.   `max_players` int(11) DEFAULT NULL,
    13.   `rating` int(11) NOT NULL DEFAULT '0',
    14.   `befirst_enabled` int(11) DEFAULT '0',
    15.   `top_enabled` int(11) DEFAULT '0',
    16.   `vip_enabled` int(11) DEFAULT '0',
    17.   `color_enabled` varchar(255) DEFAULT '0',
    18.   `gamemenu_enabled` int(11) DEFAULT '0',
    19.   `date_add` int(11) NOT NULL,
    20.   `befirst_expired_date` int(11) DEFAULT NULL,
    21.   `top_expired_date` int(11) DEFAULT NULL,
    22.   `vip_expired_date` int(11) DEFAULT NULL,
    23.   `color_expired_date` int(1) DEFAULT NULL,
    24.   `gamemenu_expired_date` int(11) DEFAULT NULL,
    25.   `boost` int(11) NOT NULL DEFAULT '0',
    26.   `boost_position` int(11) NOT NULL DEFAULT '0',
    27.   `country` varchar(64) NOT NULL,
    28.   `ban` int(11) DEFAULT '0',
    29.   `ban_couse` varchar(300) DEFAULT NULL,
    30.   `ban_date` int(11) DEFAULT NULL,
    31.   `verification_rand` int(11) DEFAULT NULL,
    32.   `description` text
    33. ) ENGINE=InnoDB AUTO_INCREMENT=149 DEFAULT CHARSET=utf8;
    Код (Text):
    1. INSERT INTO `ga_servers` (`id`, `status`, `moderation`, `id_user`, `game`, `ip`, `port`, `hostname`, `map`, `players`, `max_players`, `rating`, `befirst_enabled`, `top_enabled`, `vip_enabled`, `color_enabled`, `gamemenu_enabled`, `date_add`, `befirst_expired_date`, `top_expired_date`, `vip_expired_date`, `color_expired_date`, `gamemenu_expired_date`, `boost`, `boost_position`, `country`, `ban`, `ban_couse`, `ban_date`, `verification_rand`, `description`) VALUES
    2. (1, 1, 1, 38, 'css', '62.122.214.58', '27777', '|v34| [MEGABYTE PROJECT 163] [Public] 18+', 'de_dust2', 24, 41, 107, 0, 1, 1, '#ff99ca', 0, 1612612070, 0, 1623704400, 1629493200, 1617915600, 0, 245, 1612819588, 'RU', 0, '', 0, NULL, 'Нет описания'),
    3. (2, 1, 1, 69, 'css', '195.211.102.35', '27247', '[#1]|AUTOMIX| SHADOWS [T:7-4:CT]', 'de_tuscan', 12, 13, 0, 0, 2, 0, '0', 0, 1612612080, NULL, 1614541154, NULL, NULL, NULL, 0, 0, 'RU', 0, NULL, NULL, NULL, 'Нет описания'),
    4. (3, 1, 1, 12, 'css', '62.122.213.251', '27015', 'Заходи не бойся - читов.net [18+] NAC Protection', 'de_dust2', 16, 42, 0, 0, 3, 0, '#fbff2e', 0, 1612612092, NULL, 1615038841, NULL, 1618829588, NULL, 7, 1612893092, 'RU', 0, NULL, NULL, NULL, 'Нет описания'),
    5. (4, 1, 1, 80, 'css', '46.174.53.41', '7777', '[v34] |DeadRoom| Уральский паблик 18+', 'de_dust2', 14, 52, 0, 0, 4, 0, '0', 0, 1612612199, NULL, 1614810936, NULL, NULL, NULL, 0, 0, 'RU', 0, NULL, NULL, NULL, 'Нет описания'),
    6. (5, 1, 1, 9, 'css', '46.174.54.193', '32333', '[v34] FOGES © 2021 |PUBLIC| [OLD CS:S] |18+|', 'aim_deagle7k', 9, 33, 1, 0, 5, 0, '0', 0, 1612612208, NULL, 1614412272, NULL, NULL, NULL, 0, 0, 'RU', 0, NULL, NULL, NULL, 'Нет описания'),
    7. (6, 1, 1, 42, 'css', '46.174.52.188', '18888', '[v34] † |КИЛОБАЙТ| † © 2021 Public_18+', 'de_dust2', 54, 64, 0, 0, 6, 0, '0', 0, 1612612218, NULL, 1614361194, NULL, NULL, NULL, 0, 0, 'RU', 0, NULL, NULL, NULL, 'Нет описания');
     

    Вложения: