MyBB Community Forums

Full Version: Counting the form of a table and display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's about doing that in the Portal wyświetlało is currently provided in table form mybb_players, I know what your question is needed for this but I do not know what to do.

table name mybb_players
inquiry
SELECT COUNT(*) FROM mybb_players

Edit: I have done in such a way as below or you can make your own sub in there?

inc/functions.php
ahead
function output_page($contents)
add
ob_start();
mysql_num_rows(mysql_query("SELECT COUNT(*) FROM mybb_players"));
$playersall = ob_get_contents();
ob_end_clean(); 
Pol-English is my favorite language.

Quote: in the Portal wyświetlało is currently


Poorly you done everything in terms of optimization... and everything...

First, I recommend:
http://www.php.net/manual/pl/function.mysql-query.php

Secondly:
http://www.php.net/manual/pl/function.my...m-rows.php

Thirdly:
Learning the basics of programming and template in MyBB.

And it's gives us the following solution:
Quote:In global.php file, after 128 line:
$AllPlayersResult = $db->query("SELECT * FROM mybb_players");
$AllPlayers = $db->num_rows($AllPlayersResult);

And you can use {$AllPlayers} in any template in mybb system.