Hi all
I want to show subcategories on only the selected dealer But the below code is showing subcategories on all dealers.
» Blackberry (3)
» Battery (2)
» Samsung (1)
» Battery (1)
If Blackberry dealer is selected then only its subcategories should be visible. Samsung subcategories should be hidden.
<?php
$qry_sub="select distinct s.subcid, s.subname from subcategories as s
INNER JOIN
producttable as p
ON
s.subcid = p.subcatg and p.dealerid = ".$dealer_id." and p.status='Y'";
//echo $qry_sub;
echo "<ul>";
$result_sub=mysql_query($qry_sub);
while($row_sub=mysql_fetch_array($result_sub))
{
echo "<li></li>";
}
echo "</ul>";
?>
Thanks
Vineet