Config.php
<?php
// This is an example of config.php
$dbhost = 'localhost';
$dbuser = '';
$dbpass = '';
?>
Opendb.php
<?php
// This is an example opendb.php
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db("exile", $conn);
?>
Call the config & opendb in example index.php
<?php
include 'config.php';
include 'opendb.php';
?>
Strings to Request stuff out of the database:
Total Players:
<?php
$result = mysql_query("SELECT * FROM player");
$online = mysql_num_rows($result);
echo ''.$online, '';
?>
Total Vehicles:
<?php
$result2 = mysql_query("SELECT * FROM vehicle");
$online2 = mysql_num_rows($result2);
echo ''.$online2, '';
?>
Total Territorys:
<?php
$result3 = mysql_query("SELECT * FROM territory");
$online3 = mysql_num_rows($result3);
echo ''.$online3, '';
?>
Total Clans:
<?php
$result4 = mysql_query("SELECT * FROM clan");
$online4 = mysql_num_rows($result4);
echo ''.$online4, '';
?>
Newest Player:
<?php
$select2 = mysql_query("SELECT `name` FROM `account` ORDER BY `first_connect_at` DESC LIMIT 1;");
$r2 = mysql_fetch_array($select2);
echo ''.$r2['name'].'';
?>
Newest Clan:
<?php
$select0 = mysql_query("SELECT `name` FROM `clan` ORDER BY `created_at` DESC LIMIT 1;");
$r0 = mysql_fetch_array($select0);
echo ''.$r0['name'].'';
?>
Newest Territory:
<?php
$select1 = mysql_query("SELECT `name` FROM `territory` ORDER BY `created_at` DESC LIMIT 1;");
$r1 = mysql_fetch_array($select1);
echo ''.$r1['name'].'';
?>
to give u a little example.