[ PHPXref.com ] [ Generated: Sun Jul 20 19:13:40 2008 ] [ osCommRes 1.2.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/includes/functions/ -> categories_lookup.php (source)

   1  <?php
   2  /*

   3    Categories Functions

   4  */
   5  
   6  ////

   7  // Return a product's catagory

   8  // TABLES: products_to_catagories

   9    function tep_get_products_catagory_id($products_id) {
  10      global $languages_id;
  11  
  12      $the_products_catagory_query = tep_db_query("select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "'" . " order by products_id,categories_id");
  13      $the_products_catagory = tep_db_fetch_array($the_products_catagory_query);
  14  
  15      return $the_products_catagory['categories_id'];
  16    }
  17  
  18  ////

  19  // WebMakers.com Added: Find a Categories Name

  20  // TABLES: categories_description

  21    function tep_get_categories_name($who_am_i) {
  22      global $languages_id;
  23      $the_categories_name_query= tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id= '" . $who_am_i . "' and language_id= '" . $languages_id . "'");
  24  
  25      $the_categories_name = tep_db_fetch_array($the_categories_name_query);
  26      return $the_categories_name['categories_name'];
  27    }
  28  
  29  
  30  ////

  31  // WebMakers.com Added: Find a Categories image

  32  // TABLES: categories_image

  33    function tep_get_categories_image($what_am_i) {
  34      $the_categories_image_query= tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id= '" . $what_am_i . "'");
  35  
  36      $the_categories_image = tep_db_fetch_array($the_categories_image_query);
  37      return $the_categories_image['categories_image'];
  38    }
  39  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]