I feel like a first time poster again as it has been a while as life has been so hectic this year
I wonder if anyone can help to shed a light on how to resolve this error
The line of code in question is thisPHP Warning: mysqli_result::fetch_assoc() expects exactly 0 parameters, 1 given in
Code: Select all
$category = $category_query->fetch_assoc($category_query);Code: Select all
function tep_get_product_path($products_id) {
$cPath = '';
$category_query = $GLOBALS['db']->query("select p2c.categories_id from products p, products_to_categories p2c where p.products_id = '" . (int)$products_id . "' and p.products_status = '1' and p.products_id = p2c.products_id limit 1");
if (mysqli_num_rows($category_query)) {
$category = $category_query->fetch_assoc($category_query);
$categories = array();
tep_get_parent_categories($categories, $category['categories_id']);
$categories = array_reverse($categories);
$cPath = implode('_', $categories);
if (!Text::is_empty($cPath)) $cPath .= '_';
$cPath .= $category['categories_id'];
}
return $cPath;
}Mark