LXOwners.com

This forum is LX Forum that discusses the LX platform from Dodge. This includes, Dodge Challengers, Dodge Chargers, and Chrysler 300s.

Live Stats

[insert_php]

// set table prefix for the forums.
define(‘TABLE_PREFIX_1’, ‘charger_’);
/*
localhost: the host where mysql is running.
root : mysql username.
s : mysql password.
*/
// FORUM INFO.
$conn = mysql_connect(‘localhost’, ‘charger_vbuser’, ‘4stooges’) or die(mysql_error());
mysql_select_db(“charger_forumdata”) or die(mysql_error());

$totalUsersForum1 = mysql_query(”
SELECT COUNT(*) AS users
FROM ” . TABLE_PREFIX_1 . “user
“) or die(mysql_error());
$totalUsersForum1Count = mysql_fetch_array($totalUsersForum1) or die(mysql_error());
$firstForumUserCount = $totalUsersForum1Count[‘users’];

$totalThreadsForum1 = mysql_query(”
SELECT COUNT(*) AS threads
FROM ” . TABLE_PREFIX_1 . “thread
“) or die(mysql_error());
$totalThreadsForum1Count = mysql_fetch_array($totalThreadsForum1) or die(mysql_error());
$firstForumThreadCount = $totalThreadsForum1Count[‘threads’];

$totalPostsForum1 = mysql_query(”
SELECT COUNT(*) AS posts
FROM ” . TABLE_PREFIX_1 . “post
“) or die(mysql_error());
$totalPostsForum1Count = mysql_fetch_array($totalPostsForum1) or die(mysql_error());
$firstForumPostCount = $totalPostsForum1Count[‘posts’];

mysql_close($conn) or die(mysql_error());

// total user count:
$totalUsersCount = $firstForumUserCount;
$totalThreadsCount = $firstForumThreadCount;
$totalPostsCount = $firstForumPostCount;

$Members = number_format ($totalUsersCount);
$Topics = number_format ($totalThreadsCount);
$Discussions = number_format ($totalPostsCount);

echo ”

Total Members: $Members

Total Discussions: $Topics

Total Posts: $Discussions
“;
[/insert_php]