Post by Majna » Fri Sep 13, 2019 1:40 am

Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /home/alvitajewellery/public_html/system/library/db/mysqli.php on line 18

I took the error log from hosting account.

[12-Sep-2019 17:25:10 UTC] Error: Subquery returns more than 1 row<br />Error No: 1242<br />SELECT p.product_id, (SELECT AVG(rating) AS total FROM mr_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM mr_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 price FROM mr_product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, CASE WHEN (SELECT COUNT(*) FROM mr_product_price WHERE product_id = p.product_id AND customer_group_id = '1') > 0 THEN (SELECT price FROM mr_product_price WHERE product_id = p.product_id AND customer_group_id = '1') ELSE p.price END AS price FROM mr_product_to_category p2c LEFT JOIN mr_product p ON (p2c.product_id = p.product_id) LEFT JOIN mr_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN mr_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p2c.category_id = '94' GROUP BY p.product_id ORDER BY p.sort_order ASC, LCASE(pd.name) ASC LIMIT 0,20000


Can anybody help me please....
Thank You.

New member

Posts

Joined
Sat Jul 22, 2017 8:00 pm

Post by paulfeakins » Fri Sep 13, 2019 6:43 pm

Does this come from a review extension? If so which one?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by rjcalifornia » Fri Sep 13, 2019 6:57 pm

Majna wrote:
Fri Sep 13, 2019 1:40 am
Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /home/alvitajewellery/public_html/system/library/db/mysqli.php on line 18

I took the error log from hosting account.

[12-Sep-2019 17:25:10 UTC] Error: Subquery returns more than 1 row<br />Error No: 1242<br />SELECT p.product_id, (SELECT AVG(rating) AS total FROM mr_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM mr_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 price FROM mr_product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, CASE WHEN (SELECT COUNT(*) FROM mr_product_price WHERE product_id = p.product_id AND customer_group_id = '1') > 0 THEN (SELECT price FROM mr_product_price WHERE product_id = p.product_id AND customer_group_id = '1') ELSE p.price END AS price FROM mr_product_to_category p2c LEFT JOIN mr_product p ON (p2c.product_id = p.product_id) LEFT JOIN mr_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN mr_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p2c.category_id = '94' GROUP BY p.product_id ORDER BY p.sort_order ASC, LCASE(pd.name) ASC LIMIT 0,20000


Can anybody help me please....
Thank You.
Where did you get that warning? What were you doing when you got that warning? Can you list any third party extension installed?

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by letxobnav » Sat Sep 14, 2019 7:39 am


“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: Rob Pickers and 33 guests