You are here:  » Merchant and Product Counts on All Pages

Support Forum



Merchant and Product Counts on All Pages

Submitted by cq on Sun, 2007-08-26 13:30 in

Hi David

How can i add these code to html/header.php

$sql = "SELECT count(*) as productCount from ".$config_databaseTablePrefix."products";
database_querySelect($sql,$rows);
$productCount = $rows[0]["productCount"];
$sql = "SELECT count(*) as merchantCount from ".$config_databaseTablePrefix."feeds";
database_querySelect($sql,$rows);
$merchantCount = $rows[0]["merchantCount"];
print "We are currently listing ".$merchantCount." merchants offering over ".$productCount." products";

thanks
jack

Submitted by support on Sun, 2007-08-26 13:36

Hi Jack,

The code looks fine - so you can essentially paste it anywhere into html/header.php or html/footer.php depending on where you want it displayed. If you're not sure where to insert it (don't forget to use the PHP tags of course), let me know where you would like it displayed on the page and i'll work out where you should place the code...

Cheers,
David.

Submitted by cq on Sun, 2007-08-26 13:44

Hi David

Got it. thanks

jack