I am very green on PHP and I was wondering if somebody could help.
I have a php code that runs a query of categories and lists the number of categories right next to it. What happens though is it lists all the categories available as it should. How do I manipulate the code to just show categories with items in them.
if ($REQUEST['show']=="subcats"&&$REQUEST['parent']>0) $existItems = getSqlNumber("SELECT id FROM categories WHERE parent='".$_REQUEST['parent']."'");
if ($_REQUEST['show']=="subcats"&&$existItems>0) include_once ("catsubcategories.php");
else include_once ("catlistings.php");