首页 > 解决方案 > 在 URL 检测到:/未捕获的异常:错误:子查询返回超过 1 行错误编号:1242

问题描述

主页是空的。

Detected at URL: /
Uncaught Exception: Error: Subquery returns more than 1 row
Error No: 1242

SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price
FROM oc_product_discount pd2 WHERE pd2.product_id = p.product_id AND 
pd2.customer_group_id = '1' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' 
OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > 
NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT 
`keyword` FROM oc_seo_url WHERE `query` = CONCAT('product_id=', p.product_id) AND 
language_id='1' AND store_id='0' LIMIT 1) as xseo, (SELECT GROUP_CONCAT(fdx.name)
 filter_name FROM oc_product_filter pfx INNER JOIN oc_filter fx ON fx.filter_id = 
pfx.filter_id INNER JOIN oc_filter_description fdx ON fdx.filter_id = pfx.filter_id 
AND fdx.language_id=1 AND fdx.filter_group_id=1 WHERE pfx.product_id = p.product_id 
GROUP BY pfx.product_id) product_filters, (SELECT price FROM oc_product_special ps 
WHERE ps.product_id = p.product_id AND ps.custo in system/library/db/mysqli.php:81

标签: phpopencart

解决方案


推荐阅读