Linda,
Here are the two functions, in the order requested.
From includes/functions/functions_lookups.php:
PHP Code:
function zen_get_products_category_id($products_id) {
global $db;
$the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "'" . " order by products_id,categories_id";
$the_products_category = $db->Execute($the_products_category_query);
return $the_products_category->fields['categories_id'];
}
From admin/includes/general.php:
PHP Code:
function zen_get_products_category_id($products_id) {
global $db;
$the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "'" . " order by products_id,categories_id";
$the_products_category = $db->Execute($the_products_category_query);
return $the_products_category->fields['categories_id'];
}
Thanks, John