Tutorials

Display number of fanlistings you run

You can display the number of the fanlistings you own and their categories in your collective’s main page. I use it in my fanlisting collective to show my visitors the statistics.

To display the number of fanlistings:

<?php
include_once("config.php");
$query = "SELECT linkID FROM $table_link";
$result = mysql_query($query);
$num_link = mysql_numrows($result);
?><strong><?php echo $num_link; ?></strong>

To display the number of categories you have:

<?php
include_once("config.php");
$query = "SELECT catID FROM $table_cat";
$result = mysql_query($query);
$num_cat = mysql_numrows($result);
?><strong><?php echo $num_cat; ?></strong>

If you separated Flinx collective in a subdirectory, simply add that in the include("flinx_collective_folder/config.php");

Comments

Error Comments are closed for this entry.