Antwort #3 am: 31. Januar 2017, 18:54:45
Habe das selbe Problem / Fehlermeldung nach Update von 2.0.1.0 auf 2.0.2.1:
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 'SPECIALS_CONDITIONS' at line 5
SELECT products_id,
specials_quantity
FROM specials
WHERE products_id = '10598'
SPECIALS_CONDITIONS
Request URL: www.MEIN-SHOP/checkout_process.php
[XT SQL Error]
Ich benutze das modified responsives Template
Auszug aus der checkout_process.php
// update specials quantity
$specials_result = xtc_db_query("SELECT products_id,
specials_quantity
FROM ".TABLE_SPECIALS."
WHERE products_id = '".xtc_get_prid($order->products[$i]['id'])."'
".SPECIALS_CONDITIONS);
Hängt möglicherweise mit dem manuellen Update des Templates, speziell an der specials.php zusammen?
In der Update-Anleitung heißt es: Suche
AND s.status = '1'
AND (now() >= s.start_date
OR s.start_date IS NULL)
Und ersetze mit:
".SPECIALS_CONDITIONS_S."
In meiner specials.php gab es aber den angegebenen Absatz so nicht:
// include smartyinclude(DIR_FS_BOXES_INC
. 'smarty_default.php');// reset cache id$cache_id = '';$specials_query = xtc_db_query
("SELECT p.products_id,
pd.products_name,
p.products_price,
p.products_tax_class_id,
p.products_image,
s.expires_date,
p.products_vpe,
p.products_vpe_status,
p.products_vpe_value,
s.specials_new_products_price
FROM ".TABLE_PRODUCTS
." p
JOIN ".TABLE_PRODUCTS_DESCRIPTION
." pd
ON pd.products_id = p.products_id
AND trim(pd.products_name) != ''
AND pd.language_id = '".(int
)$_SESSION['languages_id']."'
JOIN ".TABLE_SPECIALS
." s
ON p.products_id = s.products_id
AND s.status = '1'
WHERE p.products_status = '1'
".PRODUCTS_CONDITIONS_P
."
ORDER BY MD5(CONCAT(p.products_id, CURRENT_TIMESTAMP))
LIMIT 1");if (xtc_db_num_rows
($specials_query) > 0) { $specials = xtc_db_fetch_array
($specials_query); // set cache id $cache_id = md5($_SESSION['language'].$specials['products_id']); if (!$box_smarty->is_cached(CURRENT_TEMPLATE
.'/boxes/box_specials.html', $cache_id) || !$cache) { $box_smarty->assign('box_content', $product->buildDataArray($specials)); $box_smarty->assign('SPECIALS_LINK', xtc_href_link
(FILENAME_SPECIALS
)); }}if (!$cache) { $box_specials = $box_smarty->fetch(CURRENT_TEMPLATE
.'/boxes/box_specials.html');} else { $box_specials = $box_smarty->fetch(CURRENT_TEMPLATE
.'/boxes/box_specials.html', $cache_id);}$smarty->assign('box_SPECIALS', $box_specials);?> Ich vermute, dass hier der Fehler liegt. Kann mir jemand sagen, wie ich den Code ändern muss, oder woran es sonst liegen könnte?
1000 Dank!