Here is my original query below, now would the query you mentioned go above the one I am using now to display results or do i just modifiy the one I am using.
<?PHP
$query3="SELECT * FROM subcat where categoryg='$cate' and subcat='$categoryb' and status='1' ORDER BY hits DESC";
$result3 = mysql_query($query3) or die( "ERROR: " . mysql_error() . "\n");
$j=1;
$k=1;
$num_products = mysql_num_rows($result3);
while ($myrow = mysql_fetch_array($result3)) {
if($k<=$from*$record_per_page and $k>($from-1)*$record_per_page){
$subcatid=$myrow["subcatid"];
$categoryg=$myrow["categoryg"];
$subcat=$myrow["subcat"];
$website=$myrow["website"];
$adate=$myrow["adate"];
$hits=$myrow["hits"];
$status=$myrow["status"];
?>
Then of course this is where i would ave html and echo the recults....
<?
}
$k++;
$j++;
};
?>
Also i display the results like this..
Updated: <? echo $adate;?>
adate is the date the link was added.
But of course now I would use the if statement that you mentioned to also show the graphic.
But unsure on where and how to add what you mentioned.