bradgrafelman wrote:And where is $row['linkid'] defined? Or, where is it supposed to come from?
thats just one of the ways I have tried to get it to work I'm just not sure what is the right way to do it 😕
I've tried
<?php
$catalogId = $row['linkid'];
$sql = "SELECT COUNT(*) total FROM link WHERE catalogid = $catalogId";
$result = mysql_query ($sql);
$row = mysql_fetch_row ($result);
?>
<?php print $row['total']; ?>
and also tried but this one list the same number on each category the same number is the full amount I have stored in the db
<?php
$sortby = "catalogid";
$sql="SELECT count(linkid) AS count FROM link";
$result=mysql_query($sql);
$row = mysql_fetch_array($result);
$link = $row["count"];
?>
<?php echo "$link" ?>