Ciao a tutti!
scusatemi ma mi dite dove sbaglio? La query mi restituisce il seguente errore... devo inserire due campi products_id e deposito_codice che lavorino insieme in modo tale che anche avendo due prodotti con lo stesso id gli stessi vengano differenziati dal deposito_codice...
il codice incriminato è:
e mi restituisce il seguente errore:Codice PHP:
$new_product_query = $db->Execute("select ptc.* from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on ptc.products_id = pd.products_id and pd.language_id = '" ." pd on ptc.deposito_codice = pd.deposito_codice and pd.language_id = '". (int)$_SESSION['languages_id'] . "' where ptc.categories_id='" . $current_category_id . "' order by pd.products_name");
$products_filter = $new_product_query->fields['products_id'];
zen_redirect(zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id));
}
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' where ptc.categories_id='6' order by pd.products_name' at line 1
in:
[select ptc.* from products_to_categories ptc left join products_description pd on ptc.products_id = pd.products_id and pd.language_id = ' pd on ptc.deposito_codice = pd.deposito_codice and pd.language_id = '2' where ptc.categories_id='6' order by pd.products_name]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Grazie mille a tutti e buona serata!
![]()