hey mate here is the information:
i have a field calle dcategory key and this is the function so dont know exactly what it does so not sure what type to use
PHP Code:
// Database Functions
function get_category_by_key($category_key) {
global $db;
if ($category_key == '')
return 0;
$category_query = 'select ' . TABLE_CATEGORIES . '.categories_id
from ' . TABLE_CATEGORIES . '
where categories_key = "' . trim($category_key) . '"';
$category = $db->Execute($category_query);
if ($category->EOF) {
return 0;
}
else
return $category->fields['categories_id'];
}
function get_category_by_name($category_name, $parent_id, $category_key) {
global $db;
if ($category_name == '')
return $parent_id;
$category_name = str_replace("'","'",$category_name);
$category_query = 'select ' . TABLE_CATEGORIES_DESCRIPTION . '.categories_id
from ' . TABLE_CATEGORIES_DESCRIPTION . ' INNER JOIN ' . TABLE_CATEGORIES . ' ON categories_description.categories_id=categories.categories_id
where categories_name = "' . trim($category_name) . '"
and parent_id = ' . $parent_id . '
and language_id = 1';
$category = $db->Execute($category_query);
if ($category->EOF) {
$sql_data_array = array('parent_id' => $parent_id,
'date_added' => 'now()',
'categories_key' => $category_key
);
zen_db_perform(TABLE_CATEGORIES, $sql_data_array);
$category_id = mysql_insert_id();
$db->Execute("insert into " . TABLE_CATEGORIES_DESCRIPTION . "
(language_id, categories_id, categories_name)
values ('1','" . (int)$category_id . "', '" . $category_name . "')");
return $category_id;
}
else {
$db->Execute("update " . TABLE_CATEGORIES . '
set categories_key = "' . $category_key . '" , last_modified = now()
where categories_id = "' . (int)$category->fields['categories_id'] . '"');
return $category->fields['categories_id'];
}
}
and for the rest here they are:
products_cost = New Products Cost/Price
products_group_a_price = Discount Price
products_group_b_price = Discount Price
products_group_c_price = Discount Price
products_group_d_price = Discount Price
products_delivery = is to do with things like 3-5 days and ext day delivery
just need to know what typ e and length i could use for these
thanks
aaron