Search:
query($sql) as $mainrow) { $id = $mainrow[0]; $name = $mainrow[1]; echo '
'.$name.'
'; $innersql = "select $category.id,$category.name,count($products.id) from $category,$products WHERE $category.id=$products.catid and $category.maincatid = '$id' group by $category.id order by $category.name asc"; foreach ($dbh->query($innersql) as $row) { $catid = $row[0]; $catname = $row[1]; $prodCount = $row[2]; echo ' '.$catname.'('.$prodCount.')
'; } } //include 'pricefilter.php'; ?>
View your cart
prepare($secondsql); $stm->execute(); foreach ($stm->fetchAll() as $secondrow) { echo ''; $img = $secondrow[0].'/1.jpg'; $name = $secondrow[1]; $desc = $secondrow[2]; $price = $secondrow[3]; $catid = $secondrow[4]; $catname = $secondrow[5]; echo ''.$name.''; echo $name.'
'.$desc.'
'.$price.'
View All Products from this Category'; echo '



'; } $dbh = null; include 'footer.php'; ?>