3 Replies Latest reply on Oct 28, 2010 5:39 PM by Nancy OShea

    dynamic menu bar

    iconofsin14 Level 1

      I have created a menu bar which has 2 levels (brand and product types)


      the client is able to add brands and product types using a CM system i made


      I have added code which prevents brands being displayed if there are no products for that brand and prevents product types being displayed if there are no products of that type for the relevant brand


      to do this i have used code that looks vagely like this


      $hello = mysql_query ("select * from database where brand like $brand and product type like $type");

      $test = mysql_numrows("$hello")


      if ($hello == 0 )


      print product type


      the key here is that the stock list is searched and mysql_numrows is used to determine if there are products or not


      i feal that this is very innifecent
      is there a better way?