]> jfr.im git - irc/thales.git/blame - examples/memphistools/counters/servers_tc.php
enables MysqlPort and MysqlPrefix
[irc/thales.git] / examples / memphistools / counters / servers_tc.php
CommitLineData
a04b142c 1<?php
2
3//
4// count the number of servers on the network
5// (c) tools.memphisnet.org 2003-2004
6//
7
8require_once('../common.php');
9
10$sql = 'SELECT COUNT(*) as servers_tc FROM server';
11
12$tmp = mysql_query($sql, $lid);
13$tmp = mysql_fetch_array($tmp, MYSQL_ASSOC);
14
15mysql_close($lid);
16
17echo ($_GET['m'] == 'js') ? "document.write('${tmp['servers_tc']}')" : $tmp['servers_tc'];
18
19?>