you should output it to the screen, and then try running that sql statement using phpMyadmin.
Still new to this and not sure how to do that.
Oddly, lines 86-108 don't even reference the problematic table:
Code:
(int)$_SESSION['languages_id'] . "'");
$pInfo->updateObjectInfo($product->fields);
} elseif (zen_not_null($_POST)) {
$pInfo->updateObjectInfo($_POST);
$products_name = $_POST['products_name'];
$products_description = $_POST['products_description'];
$products_url = $_POST['products_url'];
}
$category_lookup = $db->Execute("select *
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.categories_id ='" . (int)$current_category_id . "'
and c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
if (!$category_lookup->EOF) {
$cInfo = new objectInfo($category_lookup->fields);
} else {
$cInfo = new objectInfo(array());
}
There is some code before that does. Starting at line 66 which lists all of the Music specific fields:
Code:
pe.artists_id,pe.format_id,pe.record_company_id,pe.music_genre_id,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed,
p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,
p.products_sort_order,
p.products_discount_type, p.products_discount_type_from,
p.products_price_sorter, p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCT_MUSIC_EXTRA . " pe
where p.products_id = '" . (int)$_GET['pID'] . "'
and p.products_id = pd.products_id and
And some after as well (110-130):
Code:
$artists_array = array(array('id' => '', 'text' => TEXT_NONE));
$artists = $db->Execute("select artists_id, artists_name
from " . TABLE_RECORD_ARTISTS . " order by artists_name");
while (!$artists->EOF) {
$artists_array[] = array('id' => $artists->fields['artists_id'],
'text' => $artists->fields['artists_name']);
$artists->MoveNext();
}
$format_array = array(array('id' => '', 'text' => TEXT_NONE));
$format = $db->Execute("select format_id, format_name
from " . TABLE_MEDIA_FORMAT . " order by format_name");
while (!$format->EOF) {
$format_array[] = array('id' => $format->fields['format_id'],
'text' => $format->fields['format_name']);
$format->MoveNext();
}
Bookmarks