Post by papetarie » Sun Oct 07, 2012 12:18 am

and how the problems we give here soon to ask for help, I have a problem: as soon as a category change if I want to go and rescue and to amend this error occurs stupid who do not know where it comes from.

Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/paperd12/public_html/system/database/mysql.php on line 21Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'category_id=174') AS keyword FROM category WHERE category_id = '174' in /home/paperd12/public_html/system/database/mysql.php on line 49

New member

Posts

Joined
Sat Oct 22, 2011 1:26 am
Location - bucuresti

Post by rph » Sun Oct 07, 2012 4:17 am

You have more than one keyword entry for a category. You can go into your database and manually remove the extra entry or you can go to:

http://[yourstoreurl.com]/admin/index.php?route=catalog/category/update&category_id=174

And re-save the category and that should remove any redundancies.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Swissy » Fri Nov 09, 2012 10:14 pm

Hi rph

I think i got the same problem.....

but this solution with url does not work because of tokens

http://[yourstoreurl.com]/admin/index.php?route=catalog/category/update&category_id=174

db entering i tried but i have no clue where to look

I hope you can give me a hint

Newbie

Posts

Joined
Fri Apr 01, 2011 2:43 am

Post by rph » Sat Nov 10, 2012 2:49 am

Swissy wrote:but this solution with url does not work because of tokens
You just have to log in and you'll be redirect automatically. It won't work in your case because the category is specific to papetarie. You need to replace 174 with whatever the category_id is for your error.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by nikythebest » Mon Mar 04, 2013 3:13 am

Hello,

I have a simillar problem but when i try to edit some products:
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/readytow/public_html/system/database/mysql.php on line 21Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT keyword FROM url_alias WHERE query = 'product_id=63046') AS keyword FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '63046' AND pd.language_id = '2' in /home/readytow/public_html/system/database/mysql.php on line 49


Thank you.

New member

Posts

Joined
Thu Sep 15, 2011 3:54 am

Post by atzi » Sat Nov 09, 2013 10:59 am

rph wrote:You have more than one keyword entry for a category. You can go into your database and manually remove the extra entry or you can go to:

http://[yourstoreurl.com]/admin/index.php?route=catalog/category/update&category_id=174

And re-save the category and that should remove any redundancies.
I also had an Error No: 1242
I searched my mysql for dual entries and never found them. So I tried the idea above for two products that were marked in the error message. I just changed the above ------------update&category_id=174 to update&product_id=3136 (which was one of the product that stopped the certain category being chosen on the storefront).
Thanks rph

Newbie

Posts

Joined
Sat May 12, 2012 11:28 pm

Post by simpleretail » Mon Nov 11, 2013 11:26 pm

Hi I am getting this error

Warning: mysql_query(): Unable to save result set in /home/mysite/public_html/system/database/mysql.php on line 22Notice: 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 price FROM oc_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, (SELECT points FROM oc_product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '1') AS reward, (SELECT ss.name FROM oc_stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '1') AS stock_status, (SELECT wcd.unit FROM oc_weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '1') AS weight_class, (SELECT lcd.unit FROM oc_length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '1') AS length_class, (SELECT AVG(rating) AS total FROM oc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM oc_review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN oc_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '24253' AND pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' in /home/mysite/public_html/system/database/mysql.php on line 50

Has anyone found a solution or the cause for this?

Newbie

Posts

Joined
Mon Nov 11, 2013 11:23 pm

Post by pcmarket » Sun Feb 09, 2014 3:12 pm

I use opencart 1.5.5.1
when I edit product page error

"Warning: mysql_query(): Unable to save result set in /home/tabpcmar/domains/tabpcmarket.ir/public_html/system/database/mysql.php on line 22Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' > ') FROM oc_category_path cp LEFT JOIN oc_category_description cd1 ON (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) WHERE cp.category_id = c.category_id AND cd1.language_id = '2' GROUP BY cp.category_id) AS path, (SELECT keyword FROM oc_url_alias WHERE query = 'category_id=63') AS keyword FROM oc_category c LEFT JOIN oc_category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '63' AND cd2.language_id = '2' in /home/tabpcmar/domains/tabpcmarket.ir/public_html/system/database/mysql.php on line 50 "
PLZ hepl me
thanks alot of

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

Post by pcmarket » Sun Feb 09, 2014 3:12 pm

I use opencart 1.5.5.1
when I edit product page error

"Warning: mysql_query(): Unable to save result set in /home/tabpcmar/domains/tabpcmarket.ir/public_html/system/database/mysql.php on line 22Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' > ') FROM oc_category_path cp LEFT JOIN oc_category_description cd1 ON (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) WHERE cp.category_id = c.category_id AND cd1.language_id = '2' GROUP BY cp.category_id) AS path, (SELECT keyword FROM oc_url_alias WHERE query = 'category_id=63') AS keyword FROM oc_category c LEFT JOIN oc_category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '63' AND cd2.language_id = '2' in /home/tabpcmar/domains/tabpcmarket.ir/public_html/system/database/mysql.php on line 50 "
PLZ hepl me
thanks alot of

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm

User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by pcmarket » Sun Feb 09, 2014 11:05 pm

nvedia wrote:Do you have duplicate categories?
no I dont have duplicate categories

Newbie

Posts

Joined
Fri Feb 03, 2012 9:47 pm
Who is online

Users browsing this forum: No registered users and 99 guests