problemi con Newsdesk e mysql 5 -Unknown column 'p.newsdesk_

Questo forum è dedicato alle discussioni riguardanti le contribution per osCommerce

Moderatore: mod Generali

Rispondi
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

problemi con Newsdesk e mysql 5 -Unknown column 'p.newsdesk_

Messaggio da arthas »

Ciao Ragazzi,
qualcuno può aiutarmi a risolvere un problema d'incompatibilità con mysql 5 in "Newsdesk". Non appena tento di cliccare sul link delle categorie news, compare il seguente errore:

1054 - Unknown column 'p.newsdesk_id' in 'on clause'

--> pagina: newsdesk_index.php

GRAZIE! :roll:
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

E' facile che ci sia una leftjoin all'interno della query.
Se non sei esperto di SQL e quindi non t la senti di correggerla da solo posta qui la query che esegue e vedo di aiutarti a correggerla perche' io non ho tale contrib e quindi non ho avuto questo problema.
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

Anzi prima di tutto ho visto che sul forum di osc ne parlano ed e' uscito un fix dell'addon guarda se risolve il tuo problema altrimenti sempre disponibile a darti una mano :)
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

Messaggio da arthas »

Grazie duketrt per la tua proposta di aiuto. :D :D
E' vero, non sono un esperto di SQL e non so proprio come risolvere il problema. Ti posso dirè, però, che un problema molto simile a questo è stato risolto apportando le opportune modifiche al codice di pagina index.php per renderla compatibile con mysql versione 5:

viewtopic.php?t=4773

Grazie anche per la dritta riguardo il fix dell'addon! :D


Comunque, Ecco la query:

1054 - Unknown column 'p.newsdesk_id' in 'on clause'

select count(p.newsdesk_id) as total from newsdesk_description pd, newsdesk p left join manufacturers m on p.newsdesk_id = m.manufacturers_id, newsdesk_to_categories p2c left join specials s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '4' and p2c.categories_id = '1'

[TEP STOP]


Grazie ancora, CIAO!

Arthas
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

Si avevo fatto io quel lungo post che hai citato adesso se la query nonostante l'addon che ti ho segnalato ti genera errori vuol dire che o non e' stata corretta del tutto o il fix non riguardava quella.
Vediamo subito di correggerla la query giusta dovra' essere:

Codice: Seleziona tutto

select count(p.newsdesk_id) as total from ((newsdesk_description pd join newsdesk p) left join manufacturers m on p.newsdesk_id = m.manufacturers_id join newsdesk_to_categories p2c) left join specials s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '4' and p2c.categories_id = '1' 
Prima di cercare nel codice come modificarla provala usando phpmyadmin e a quel punto se il risultato non e' un errore vedi se e' circa quello che ti aspetti di trovare (ad occhio dovrebbe restituire un intero risultato del conto come per tutte le query che avevo corretto per il problema piu' generico di osc con mysql5) ed in questo caso vai a cercarti nel file che richiami quando ti appare questo errore se trovi una query di 'count(' .$VARIABILENOMETABELLANEWDESK .')....' etc etc e moficia aggiungendo le parentesi ed i join al posto delle virgole come ho fatto.
Good Luck :D
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

Messaggio da arthas »

Ho provato la query con phpmyadmin e non dà errore. Però non riesco ad implementare correttamente il codice. A questo punto non so che fare... :cry: Di seguito inserisco il codice della pagina incriminata:

Codice: Seleziona tutto

<?php
require('includes/application_top.php');
require('includes/functions/newsdesk_general.php');

// set application wide parameters --- this query set is for NewsDesk
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
	define($configuration['cfgKey'], $configuration['cfgValue']);
}
// calculate category path
if ($HTTP_GET_VARS['newsPath']) {
	$newsPath = $HTTP_GET_VARS['newsPath'];
} elseif ($HTTP_GET_VARS['newsdesk_id'] && !$HTTP_GET_VARS['manufacturers_id']) {
	$newsPath = newsdesk_get_product_path($HTTP_GET_VARS['newsdesk_id']);
} else {
	$newsPath = '';
}

if (strlen($newsPath) > 0) {
	$newsPath_array = newsdesk_parse_category_path($newsPath);
	$newsPath = implode('_', $newsPath_array);
	$current_category_id = $newsPath_array[(sizeof($newsPath_array)-1)];
} else {
	$current_category_id = 0;
}

if (isset($newsPath_array)) {
	$n = sizeof($newsPath_array);
	for ($i = 0; $i < $n; $i++) {
		$categories_query = tep_db_query(
		"select categories_name from " . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " where categories_id = '" . $newsPath_array[$i] 
		. "' and language_id='" . $languages_id . "'"
		);
		if (tep_db_num_rows($categories_query) > 0) {
			$categories = tep_db_fetch_array($categories_query);
			$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'newsPath=' 
			. implode('_', array_slice($newsPath_array, 0, ($i+1)))));
		} else {
			break;
		}
	}
}


// the following newsPath references come from application_top.php
$category_depth = 'top';
if ($newsPath) {
	$category_parent_query = tep_db_query(
	"select count(*) as total from " . TABLE_NEWSDESK_CATEGORIES . " where parent_id = '" . $current_category_id . "'");

	$category_parent = tep_db_fetch_array($category_parent_query);
	if ($category_parent['total'] > 0) {
		$category_depth = 'nested'; // navigate through the categories
	} else {
		$category_depth = 'products'; // category has no products, but display the 'no products' message
	}
}
//}  // I lost track to what loop this is closing ... ugh I hate when this happens
// ------------------------------------------------------------------------------------------------------------------------------------------
// Output a form pull down menu
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
function newsdesk_show_draw_pull_down_menu($name, $values, $default = '', $params = '', $required = false) {

$field = '<select name="' . $name . '"';
if ($params) $field .= ' ' . $params;
	$field .= '>';
	for ($i=0; $i<sizeof($values); $i++) {
		$field .= '<option value="' . $values[$i]['id'] . '"';
		if ( ($GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) ) {
			$field .= ' SELECTED';
		}
		$field .= '>' . $values[$i]['text'] . '</option>';
	}
	$field .= '</select>';
	$field .= tep_hide_session_id();

	if ($required) $field .= NEWS_TEXT_FIELD_REQUIRED;

return $field;
}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWSDESK_INDEX);
?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
	<tr>
		    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table>
		</td>
<!-- body_text //-->
<?php
if ($category_depth == 'nested') {
	$category_query = tep_db_query(
	"select cd.categories_name, c.categories_image from " . TABLE_NEWSDESK_CATEGORIES . " c, " .  newsdesk_categories_description . 
	" cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" 
	. $languages_id . "'"
	);

	$category = tep_db_fetch_array($category_query);
?>

		<td width="100%" valign="top">
<!-- Wolfen added code BOF -->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
	<tr>
		<td class="pageHeading" width="70%">
<?php
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// let's make a drop down with all the categories and subcategories
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
$info_box_contents = array();
if (MAX_MANUFACTURERS_LIST < 2) {
	$cat_choose = array(array('id' => '', 'text' => NEWS_BOX_CATEGORIES_CHOOSE));
} else {
	$cat_choose = '';
}
// Below lines changed by Wolfen
$categories_array = newsdesk_get_categories($cat_choose);
for ($i=0; $i<sizeof($categories_array); $i++) {
	$path = "";
	$parent_categories = array();
//	newsdesk_get_parent_categories($parent_categories, $categories_array[$i]['id']);
//	for ($j = sizeof($parent_categories) - 1; $j>=0; $j--) {
//		$path = ($path == "") ? $parent_categories[$j] : ($path . "_" . $parent_categories[$j]);
//	}
	$categories_array[$i]['id'] = ($path == "") ? $categories_array[$i]['id'] : ($path . "_" . $categories_array[$i]['id']);
}
$info_box_contents[] = array(
		'form' => '<form action="' . tep_href_link(FILENAME_NEWSDESK_INDEX) . '" method="get">',
		'align' => 'center',
		'text'  => newsdesk_show_draw_pull_down_menu('newsPath', $categories_array,'','onChange="this.form.submit();" size="' . ((sizeof($categories_array) < MAX_MANUFACTURERS_LIST) ? sizeof($categories_array) : MAX_MANUFACTURERS_LIST) . '" style="width:' . BOX_WIDTH . '"')
	);
new infoBox($info_box_contents);
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
?>
		</td></form>
		<td class="pageHeading" width="30%">
<?php
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// show search box
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
$hide = tep_hide_session_id();
$info_box_contents = array();
$info_box_contents[] = array(
	'form'  => '<form name="quick_find_news" method="get" action="' . tep_href_link(FILENAME_NEWSDESK_SEARCH_RESULT, '', 'NONSSL', false) . '">',
	'align' => 'center',
	'text'  => 
$hide . '<input type="text" name="keywords" size="20" maxlength="30" value="' 
. htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"])) 
. '" style="width: ' . (BOX_WIDTH-30) . 'px"> ' . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH)
);
  new infoBox($info_box_contents);
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
?>
		</td>
	</tr>
</table>
</form>
<!-- Wolfen added code EOF -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right">
<?php
if (($category['categories_image'] = 'NULL') or ($category['categories_image'] = '')) {
echo tep_draw_separator('pixel_trans.gif', '1', '1');
} else {
echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
}
?>
		</td>
	</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>

<?php
if ($newsPath && ereg('_', $newsPath)) {
// check to see if there are deeper categories within the current category
	$category_links = array_reverse($newsPath_array);
	$size = sizeof($category_links);
	for($i=0; $i<$size; $i++) {
		$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " 
		. TABLE_NEWSDESK_CATEGORIES . " c, " . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $category_links[$i] 
		. "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name");
		if (tep_db_num_rows($categories_query) < 1) {
// do nothing, go through the loop
		} else {
			break; // we've found the deepest category the customer is in
		}
	}
} else {
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " 
. TABLE_NEWSDESK_CATEGORIES . " c, " . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" 
. $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id 
. "' order by sort_order, cd.categories_name");
}

if (($categories['categories_image'] = 'NULL') || categories) {
} else {
$print_echo = tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT);
}

$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {
	$rows++;
	$newsPath_new = newsdesk_get_path($categories['categories_id']);
	$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

	echo '
<td align="left" class="smallText" style="width: ' . $width . '" valign="top">
<a href="' . tep_href_link(FILENAME_NEWSDESK_INDEX, $newsPath_new, 'NONSSL') . '">' .  $print_echo 
. '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

	if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != tep_db_num_rows($categories_query))) {
		echo '</tr>' . "\n";
		echo '<tr>' . "\n";
	}
}
?>

	</tr>
</table>

		</td>
<?php
} elseif ($category_depth == 'products') {
// create column list
$define_list = array(
	'NEWSDESK_IMAGE' => NEWSDESK_IMAGE,
	'NEWSDESK_IMAGE_TWO' => NEWSDESK_IMAGE_TWO,
	'NEWSDESK_IMAGE_THREE' => NEWSDESK_IMAGE_THREE,
	'NEWSDESK_ARTICLE_URL' => NEWSDESK_ARTICLE_URL,
	'NEWSDESK_ARTICLE_URL_NAME' => NEWSDESK_ARTICLE_URL_NAME,
	'NEWSDESK_ARTICLE_DESCRIPTION' => NEWSDESK_ARTICLE_DESCRIPTION,
	'NEWSDESK_ARTICLE_SHORTTEXT' => NEWSDESK_ARTICLE_SHORTTEXT,
	'NEWSDESK_ARTICLE_NAME' => NEWSDESK_ARTICLE_NAME,
	'NEWSDESK_DATE_AVAILABLE' => NEWSDESK_DATE_AVAILABLE,
	'NEWSDESK_STATUS' => NEWSDESK_STATUS,
);

	asort($define_list);

	$column_list = array();
	reset($define_list);
	while (list($column, $value) = each($define_list)) {
		if ($value) $column_list[] = $column;
	}

	$select_column_list = '';

	$size = sizeof($column_list);
	for ($col=0; $col<$size; $col++) {
		if ( ($column_list[$col] == 'NEWSDESK_ARTICLE_NAME') || ($column_list[$col] == 'NEWSDESK_ARTICLE_SHORTTEXT') ) {
			continue;
		}

		if ($select_column_list != '') {
			$select_column_list .= ', ';
		}
		switch ($column_list[$col]) {
		case 'NEWSDESK_IMAGE': $select_column_list .= 'p.newsdesk_image';
			break;
		case 'NEWSDESK_IMAGE_TWO': $select_column_list .= 'p.newsdesk_image_two';
			break;
		case 'NEWSDESK_IMAGE_THREE': $select_column_list .= 'p.newsdesk_image_three';
			break;
		case 'NEWSDESK_ARTICLE_URL': $select_column_list .= 'pd.newsdesk_article_url';
			break;
		case 'NEWSDESK_ARTICLE_URL_NAME': $select_column_list .= 'pd.newsdesk_article_url_name';
			break;
		case 'NEWSDESK_ARTICLE_DESCRIPTION': $select_column_list .= 'pd.newsdesk_article_description';
			break;
		case 'NEWSDESK_ARTICLE_SHORTTEXT': $select_column_list .= 'pd.newsdesk_article_shorttext';
			break;
		case 'NEWSDESK_ARTICLE_NAME': $select_column_list .= 'pd.newsdesk_article_name';
			break;
		case 'NEWSDESK_DATE_AVAILABLE': $select_column_list .= 'p.newsdesk_date_added';
			break;
		case 'NEWSDESK_STATUS': $select_column_list .= 'p.newsdesk_status';
			break;
		}
	}

	if ($select_column_list != '') {
		$select_column_list .= ', ';
	}

// show the products of a specified manufacturer
	if ($HTTP_GET_VARS['manufacturers_id']) {
		if ($HTTP_GET_VARS['filter_id']) {
		} else {
// We show them all
$listing_sql = "select " . $select_column_list . "  p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, 
pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, 
IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, 
IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_MANUFACTURERS . 
" m left join " 
. TABLE_SPECIALS . " s 
on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and pd.newsdesk_id = p.newsdesk_id 
and pd.language_id = '" . $languages_id . "' and m.manufacturers_id = '" 
. $HTTP_GET_VARS['manufacturers_id'] . "'";

		}

// We build the categories-dropdown
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_TO_CATEGORIES . " p2c, " 
. TABLE_NEWSDESK_CATEGORIES . " c, " 
. TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " cd 
where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id 
and cd.language_id = '" . $languages_id . "' order by cd.categories_name";

		} else {

// show the products in a given categorie

		if ($HTTP_GET_VARS['filter_id']) {

// We are asked to show only specific catgeory
$listing_sql = "select " . $select_column_list . " p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, 
pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, 
IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, 
IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_MANUFACTURERS . " m, " 
. TABLE_NEWSDESK_TO_CATEGORIES . 
" p2c left join " 
. TABLE_SPECIALS . " s 
on p.newsdesk_id = s.products_id where 
p.newsdesk_status = '1' and m.manufacturers_id = '" . $HTTP_GET_VARS['filter_id'] . 
"' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '" . $languages_id . "' 
and p2c.categories_id = '" . $current_category_id . "'";

		} else {

// We show them all
$listing_sql = "select " . $select_column_list . " p.newsdesk_id, p.newsdesk_status, p.newsdesk_date_added, pd.newsdesk_article_name, pd.newsdesk_article_shorttext, 
pd.newsdesk_article_description, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, 
IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, 
IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_NEWSDESK . 
" p left join " 
. TABLE_MANUFACTURERS . 
" m on p.newsdesk_id = m.manufacturers_id, " 
. TABLE_NEWSDESK_TO_CATEGORIES . " p2c 
left join " 
. TABLE_SPECIALS . " s on 
p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id 
and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'";

		}

// We build the manufacturers Dropdown
$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_TO_CATEGORIES . " p2c, " 
. TABLE_MANUFACTURERS . " m 
where p.newsdesk_status = '1' and p.newsdesk_id = m.manufacturers_id and p.newsdesk_id = p2c.newsdesk_id and p2c.categories_id = '" 
. $current_category_id . "' order by m.manufacturers_name";

	}

	$cl_size = sizeof($column_list);
	if ( (!$HTTP_GET_VARS['sort']) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'],0,1) > $cl_size) ) {
		for ($col=0; $col<$cl_size; $col++) {
			if ($column_list[$col] == 'NEWSDESK_DATE_AVAILABLE') {
				$HTTP_GET_VARS['sort'] = $col+1 . 'd';
				$listing_sql .= " order by p.newsdesk_date_added desc";
				break;
			}
		}
	} else {
		$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
		$sort_order = substr($HTTP_GET_VARS['sort'], 1);
		$listing_sql .= ' order by ';
		switch ($column_list[$sort_col-1]) {
	case 'NEWSDESK_IMAGE': $listing_sql .= "p.newsdesk_image " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_IMAGE_TWO': $listing_sql .= "p.newsdesk_image_two " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_IMAGE_THREE': $listing_sql .= "p.newsdesk_image_three " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_ARTICLE_URL': $listing_sql .= "pd.newsdesk_article_url " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_ARTICLE_URL_NAME': $listing_sql .= "pd.newsdesk_article_url_name " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_ARTICLE_DESCRIPTION': $listing_sql .= "pd.newsdesk_article_description " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_ARTICLE_SHORTTEXT': $listing_sql .= "pd.newsdesk_article_shorttext " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_ARTICLE_NAME': $listing_sql .= "pd.newsdesk_article_name " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_DATE_AVAILABLE': $listing_sql .= "p.newsdesk_date_added " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
	case 'NEWSDESK_STATUS': $listing_sql .= "p.newsdesk_status " . ($sort_order == 'd' ? "desc" : "") . ", p.newsdesk_date_added";
		break;
		}
	}
?>

		<td width="100%" valign="top">
<!-- Wolfen added code BOF -->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
	<tr>
		<td class="pageHeading" width="70%">
<?php
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// let's make a drop down with all the categories and subcategories
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
$info_box_contents = array();
if (MAX_MANUFACTURERS_LIST < 2) {
	$cat_choose = array(array('id' => '', 'text' => NEWS_BOX_CATEGORIES_CHOOSE));
} else {
	$cat_choose = '';
}
// Below lines changed by Wolfen
$categories_array = newsdesk_get_categories($cat_choose);
for ($i=0; $i<sizeof($categories_array); $i++) {
	$path = "";
	$parent_categories = array();
//	newsdesk_get_parent_categories($parent_categories, $categories_array[$i]['id']);
//	for ($j = sizeof($parent_categories) - 1; $j>=0; $j--) {
//		$path = ($path == "") ? $parent_categories[$j] : ($path . "_" . $parent_categories[$j]);
//	}
	$categories_array[$i]['id'] = ($path == "") ? $categories_array[$i]['id'] : ($path . "_" . $categories_array[$i]['id']);
}
$info_box_contents[] = array(
		'form' => '<form action="' . tep_href_link(FILENAME_NEWSDESK_INDEX) . '" method="get">',
		'align' => 'center',
		'text'  => newsdesk_show_draw_pull_down_menu('newsPath', $categories_array,'','onChange="this.form.submit();" size="' . ((sizeof($categories_array) < MAX_MANUFACTURERS_LIST) ? sizeof($categories_array) : MAX_MANUFACTURERS_LIST) . '" style="width:' . BOX_WIDTH . '"')
	);
new infoBox($info_box_contents);
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
?>
		</td></form>
		<td class="pageHeading" width="30%">
<?php
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// show search box
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
$hide = tep_hide_session_id();
$info_box_contents = array();
$info_box_contents[] = array(
	'form'  => '<form name="quick_find_news" method="get" action="' . tep_href_link(FILENAME_NEWSDESK_SEARCH_RESULT, '', 'NONSSL', false) . '">',
	'align' => 'center',
	'text'  => 
$hide . '<input type="text" name="keywords" size="20" maxlength="30" value="' 
. htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"])) 
. '" style="width: ' . (BOX_WIDTH-30) . 'px"> ' . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH)
);
  new infoBox($info_box_contents);
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
?>
		</td>
	</tr>
</table>
</form>
<!-- Wolfen added code EOF -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<form>
	<tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<?php
// optional Product List Filter

// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if ($HTTP_GET_VARS['newsdesk_id']) {
	$image = tep_db_query("select newsdesk_image from " . TABLE_NEWSDESK . " where newsdesk_id = '" . $HTTP_GET_VARS['newsdesk_id'] . "'");
	$image = tep_db_fetch_array($image);
	$image = $image['newsdesk_image'];

	$image_two = tep_db_query("select newsdesk_image_two from " . TABLE_NEWSDESK . " where newsdesk_id = '" . $HTTP_GET_VARS['newsdesk_id'] . "'");
	$image_two = tep_db_fetch_array($image_two);
	$image_two = $image['newsdesk_image_two'];

	$image_three = tep_db_query("select newsdesk_image_three from " . TABLE_NEWSDESK . " where newsdesk_id = '" . $HTTP_GET_VARS['newsdesk_id'] . "'");
	$image_three = tep_db_fetch_array($image_three);
	$image_three = $image['newsdesk_image_three'];

} elseif ($current_category_id) {
	$image = tep_db_query("select categories_image from " . TABLE_NEWSDESK_CATEGORIES . " where categories_id = '" . $current_category_id . "'");
	$image = tep_db_fetch_array($image);
	$image = $image['categories_image'];
}
?>

		<td align="right">
<?php
if ($category['categories_image'] == 'null') {
echo '';
} else {
echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
echo tep_image(DIR_WS_IMAGES . $image_two, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
echo tep_image(DIR_WS_IMAGES . $image_three, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
}
?>
		</td>
	</tr>
</form>
</table>
		</td>
	</tr>
	<tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>
	<tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_NEWSDESK_LISTING); ?></td>
	</tr>
</table>
		</td>
<?php
}
?>

<!-- body_text_eof //-->
		</td>
		    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->
</table>
		</td>
	</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

<?php
Grazie ancora per il tuo aiuto.

CIAO!

arthas
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

All'interno del file incrominato non c'e' la query incriminata indi per cui:

Codice: Seleziona tutto

require('includes/application_top.php'); 
require('includes/functions/newsdesk_general.php');
Visto che ad inizio codice fa' questi 2 include e' facile che quella query sia in uno di questi.
Ora la cosa e' semplice se hai modificato application_top per installare tale contrib puo' essere anche li il codice della query da modificare altrimenti escludilo e guarda direttamente nel file newsdesk_general.
Se non riesci a capire come correggerla pure da li pasta pure il codice e ti vedro' di essere d'aiuto.
ciao
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

Messaggio da arthas »

Niente da fare..., scusa duketrt, ma a questo punto ti posto il codice di newsdesk_general.php:

Codice: Seleziona tutto

<?php
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Generate a path to categories
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
function newsdesk_get_path($current_category_id = '') {
global $newsPath_array;

if ($current_category_id) {
	$cp_size = sizeof($newsPath_array);
	if ($cp_size == 0) {
		$newsPath_new = $current_category_id;
	} else {
		$newsPath_new = '';
		$last_category_query = tep_db_query("select parent_id from " . TABLE_NEWSDESK_CATEGORIES . " where categories_id = '" . $newsPath_array[($cp_size-1)] . "'");
		$last_category = tep_db_fetch_array($last_category_query);
		$current_category_query = tep_db_query("select parent_id from " . TABLE_NEWSDESK_CATEGORIES . " where categories_id = '" . $current_category_id . "'");
		$current_category = tep_db_fetch_array($current_category_query);
		if ($last_category['parent_id'] == $current_category['parent_id']) {
			for ($i=0; $i<($cp_size-1); $i++) {
				$newsPath_new .= '_' . $newsPath_array[$i];
			}
		} else {
			for ($i=0; $i<$cp_size; $i++) {
				$newsPath_new .= '_' . $newsPath_array[$i];
			}
		}
		$newsPath_new .= '_' . $current_category_id;
		if (substr($newsPath_new, 0, 1) == '_') {
			$newsPath_new = substr($newsPath_new, 1);
		}
	}
} else {
	$newsPath_new = implode('_', $newsPath_array);
}

return 'newsPath=' . $newsPath_new;

}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Parse and secure the newsPath parameter values
function newsdesk_parse_category_path($newsPath) {
// make sure the category IDs are integers
$newsPath_array = array_map('tep_string_to_int', explode('_', $newsPath));

// make sure no duplicate category IDs exist which could lock the server in a loop
$tmp_array = array();
$n = sizeof($newsPath_array);
for ($i=0; $i<$n; $i++) {
	if (!in_array($newsPath_array[$i], $tmp_array)) {
		$tmp_array[] = $newsPath_array[$i];
	}
}

return $tmp_array;

}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Return true if the category has subcategories
// TABLES: categories
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
function newsdesk_has_category_subcategories($category_id) {
$child_category_query = tep_db_query("select count(*) as count from " . TABLE_NEWSDESK_CATEGORIES . " where parent_id = '" . $category_id . "'");
$child_category = tep_db_fetch_array($child_category_query);

if ($child_category['count'] > 0) {
	return true;
} else {
	return false;
}

}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Construct a category path to the product
// TABLES: products_to_categories
function newsdesk_get_product_path($products_id) {
$newsPath = '';

$cat_count_sql = tep_db_query("select count(*) as count from " . TABLE_NEWSDESK_TO_CATEGORIES . " where newsdesk_id = '" . $products_id . "'");
$cat_count_data = tep_db_fetch_array($cat_count_sql);

if ($cat_count_data['count'] == 1) {
	$categories = array();

	$cat_id_sql = tep_db_query("select categories_id from " . TABLE_NEWSDESK_TO_CATEGORIES . " where newsdesk_id = '" . $products_id . "'");
	$cat_id_data = tep_db_fetch_array($cat_id_sql);
	newsdesk_get_parent_categories($categories, $cat_id_data['categories_id']);

	$size = sizeof($categories)-1;
	for ($i = $size; $i >= 0; $i--) {
		if ($newsPath != '') $newsPath .= '_';
			$newsPath .= $categories[$i];
	}
	if ($newsPath != '') $newsPath .= '_';
		$newsPath .= $cat_id_data['categories_id'];
}

return $newsPath;

}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Recursively go through the categories and retreive all parent categories IDs
// TABLES: categories
function newsdesk_get_parent_categories(&$categories, $categories_id) {
$parent_categories_query = tep_db_query("select parent_id from " . TABLE_NEWSDESK_CATEGORIES . " where categories_id = '" . $categories_id . "'");

while ($parent_categories = tep_db_fetch_array($parent_categories_query)) {
	if ($parent_categories['parent_id'] == 0) return true;
		$categories[sizeof($categories)] = $parent_categories['parent_id'];
		if ($parent_categories['parent_id'] != $categories_id) {
			newsdesk_get_parent_categories($categories, $parent_categories['parent_id']);
		}
	}
}

// Wolfen added code BOF
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
function newsdesk_get_categories($categories_array = '', $parent_id = '0', $indent = '') {
global $languages_id;

$parent_id = tep_db_prepare_input($parent_id);

if (!is_array($categories_array)) $categories_array = array();

$categories_query = tep_db_query(
"select c.categories_id, cd.categories_name from " . TABLE_NEWSDESK_CATEGORIES . " c, " . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " 
cd where c.catagory_status = '1' and parent_id = '" . tep_db_input($parent_id) . "' and c.categories_id = cd.categories_id and cd.language_id = '" 
. $languages_id . "' order by sort_order, cd.categories_name"
);

while ($categories = tep_db_fetch_array($categories_query)) {
	$categories_array[] = array(
		'id' => $categories['categories_id'],
		'text' => $indent . $categories['categories_name']
	);

	if ($categories['categories_id'] != $parent_id) {
		$categories_array = newsdesk_get_categories($categories_array, $categories['categories_id'], $indent . '  ');
	}
}

return $categories_array;
}
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
// Return all subcategory IDs
// TABLES: categories
function newsdesk_get_subcategories(&$subcategories_array, $parent_id = 0) {
$subcategories_query = tep_db_query("select categories_id from " . TABLE_NEWSDESK_CATEGORIES . " where parent_id = '" . $parent_id . "'");

while ($subcategories = tep_db_fetch_array($subcategories_query)) {
	$subcategories_array[sizeof($subcategories_array)] = $subcategories['categories_id'];
	if ($subcategories['categories_id'] != $parent_id) {
		newsdesk_get_subcategories($subcategories_array, $subcategories['categories_id']);
	}
}

}

?>
Ciao, grazie ancora!
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

Nien nulla da fare aspetta dopo pranzo mi scarico tale contrib e guardo io che faccio prima piuttosto che farti uppare pezzi di codice a caso ogni volta che vedo un include :D
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

Backuppa i file che hai e prova a modificare queste righe:
dal file newsdes_index.php
da line 323 trovi

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_MANUFACTURERS . 
" m left join " 
. TABLE_SPECIALS . " s
Sostituiscilo con:

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from (((" 
. TABLE_NEWSDESK . " p) join " 
. TABLE_NEWSDESK_DESCRIPTION . " pd) join " 
. TABLE_MANUFACTURERS . 
") m left join " 
. TABLE_SPECIALS . " s
Subito sotto:
a riga 353

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK . " p, " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_MANUFACTURERS . " m, " 
. TABLE_NEWSDESK_TO_CATEGORIES . 
" p2c left join " 
. TABLE_SPECIALS . " s
Sostiuscilo con:

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from (((" 
. TABLE_NEWSDESK . " p join " 
. TABLE_NEWSDESK_DESCRIPTION . " pd) join " 
. TABLE_MANUFACTURERS . " m) join " 
. TABLE_NEWSDESK_TO_CATEGORIES . 
" p2c) left join " 
. TABLE_SPECIALS . " s
a riga 371:

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from " 
. TABLE_NEWSDESK_DESCRIPTION . " pd, " 
. TABLE_NEWSDESK . 
" p left join " 
. TABLE_MANUFACTURERS . 
" m on p.newsdesk_id = m.manufacturers_id, " 
. TABLE_NEWSDESK_TO_CATEGORIES . " p2c 
left join " 
. TABLE_SPECIALS . " s on 
Sostituiscilo con:

Codice: Seleziona tutto

IF(s.status, s.specials_new_products_price, NULL) as final_price from (((" 
. TABLE_NEWSDESK_DESCRIPTION . " pd join " 
. TABLE_NEWSDESK . 
" p) left join " 
. TABLE_MANUFACTURERS . 
" m on p.newsdesk_id = m.manufacturers_id) join " 
. TABLE_NEWSDESK_TO_CATEGORIES . " p2c )
left join " 
. TABLE_SPECIALS . " s on 
A una prima vista potrebbe bastare questo ma mi riservo di errare ho solo dato un occhiata veloce al codice in pausa pranzo x una contrib che non ho installato ma guardando solo i file che tale contrib aggiunge.
fammi sapere
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

Messaggio da arthas »

SEI UN GRANDE duketrt !!! FUNZIONA TUTTO A MERAVIGLIA!!! :D

GRAZIE MILLE!!! :D

Senza il tuo aiuto non so come avrei potuto fare!

CIAO!

arthas.
duketrt
membro Baby
membro Baby
Messaggi: 63
Iscritto il: 14/11/2005, 15:55

Messaggio da duketrt »

Figurati, contento di esserti stato di aiuto :)
arthas
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/11/2005, 1:21

Messaggio da arthas »

duketrt, grazie al tuo aiuto, stavolta ho risolto da me lo stesso tipo di errore circa una query sbagliata per incompatibilità con mysql5 di pag.: all_products.php . Spero, anche se si tratta di una piccola correzione, possa giovare a qualcuno.

- riga 56 -

da:

Codice: Seleziona tutto

$products_new_query_raw = "select s.specials_new_products_price, p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name";

sostituire con:

Codice: Seleziona tutto

$products_new_query_raw = "select s.specials_new_products_price, p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from ((" . TABLE_PRODUCTS . " p , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name";
Ciao duketrt, alla prossima! :)
Avatar utente
masocost
membro Baby
membro Baby
Messaggi: 56
Iscritto il: 24/11/2005, 16:02
Località: Cagliari
Contatta:

Messaggio da masocost »

arthas ha scritto:duketrt, grazie al tuo aiuto, stavolta ho risolto da me lo stesso tipo di errore circa una query sbagliata per incompatibilità con mysql5 di pag.: all_products.php . Spero, anche se si tratta di una piccola correzione, possa giovare a qualcuno.

- riga 56 -

da:

Codice: Seleziona tutto

$products_new_query_raw = "select s.specials_new_products_price, p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name";

sostituire con:

Codice: Seleziona tutto

$products_new_query_raw = "select s.specials_new_products_price, p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from ((" . TABLE_PRODUCTS . " p , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name";
Ciao duketrt, alla prossima! :)
grazie arthas ho risolto uno dei miei 3 problemi!!!
Per caso sai risolvere anche questi due?

1°) 1054 - Unknown column 'p.products_id' in 'on clause'

select count(distinct p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '4' and p2c.categories_id = '17'

2°) 1054 - Unknown column 'p.products_id' in 'on clause'

select count(distinct p.products_id) as total from products p, products_description pd, manufacturers m left join specials s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '4' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '8'

Sono disperato!!! :cry: :cry:

ciao grazie
Avatar utente
masocost
membro Baby
membro Baby
Messaggi: 56
Iscritto il: 24/11/2005, 16:02
Località: Cagliari
Contatta:

Messaggio da masocost »

risolto!! :lol: :lol: :lol: !

basta applicare le modifiche che si trovano nel file update-20051113.txt di oscommerce-2.2ms2-051113. Dare uno ssguardo all' ultimo bagfix che tratta di mysql 5.0! :lol:

grazie e scusate il disturbo!!!
a presto
Rispondi