Quote:
Originally posted by Logician
Sure, why not:
Leave the original code as it is and add these 2 lines after them:
$count_maxx_posts=$DB_site->query_first('SELECT postid AS posts FROM post ORDER BY postid DESC LIMIT 1' );
$count_maxx_threads=$DB_site->query_first('SELECT threadid AS threads FROM thread ORDER BY threadid DESC LIMIT 1');
Now you can change your main page template and use these 2 variables $count_maxx_posts and $count_maxx_threads in anywhere or in any way you like..
Logician
|
i get this error on my index.php i use
Code:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
VBB 2.2.7
here is what i got in my index.php
Code:
// get total posts ever
$count_maxx_posts=$DB_site->query_first('SELECT postid AS posts FROM post ORDER BY postid DESC LIMIT 1' );
$count_maxx_posts=number_format($count_maxx_posts['posts']);
$count_maxx_threads=$DB_site->query_first('SELECT threadid AS threads FROM thread ORDER BY threadid DESC LIMIT 1');
$count_maxx_posts=number_format($count_maxx_threads['threads']);