Stats\n"; $dsn = "mysqli://$user:$passwd@$host/$db"; $conn =& DB::connect($dsn); if (DB::isError($conn)) { die ("Cannot connect: " . $conn->getMessage() . "\n"); } $conn->query("SET NAMES utf8"); echo "

Tagpairs in the DB

\n"; $result =& $conn->query("SELECT COUNT(*) FROM tagpairs"); if (DB::isError($result) || $result->numRows() != 1) { die ("SELECT failed: " . $result->getMessage() . "\n"); } $row =& $result->fetchRow(); echo displayNum($row[0])."\n"; $result->free(); echo "

Number of tagpairs parsed to generate the DB

\n"; $result =& $conn->query("SELECT SUM(c_total) FROM tagpairs"); if (DB::isError($result) || $result->numRows() != 1) { die ("SELECT failed: " . $result->getMessage() . "\n"); } $row =& $result->fetchRow(); echo displayNum($row[0])."\n"; $result->free(); echo "

Number of different tags in the DB

\n"; $result =& $conn->query("SELECT COUNT(DISTINCT tag) FROM tagpairs"); if (DB::isError($result) || $result->numRows() != 1) { die ("SELECT failed: " . $result->getMessage() . "\n"); } $row =& $result->fetchRow(); echo displayNum($row[0])."\n"; $result->free(); echo "

\n"; echo "Back to index page\n"; $conn->disconnect(); ?>