Hi I am new to the forum, I an I need some help on the following error, thank you.
Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in /home/venomvap/public_html/store/system/library/db/mysqli.php on line 18Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' > ') FROM vv_category_path cp LEFT JOIN vv_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 = '1' GROUP BY cp.category_id) AS path, (SELECT DISTINCT keyword FROM vv_url_alias WHERE query = 'category_id=56') AS keyword FROM vv_category c LEFT JOIN vv_category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '56' AND cd2.language_id = '1' in /home/venomvap/public_html/store/system/library/db/mysqli.php on line 40Notice: Trying to get property of non-object in /home/venomvap/public_html/store/admin/model/catalog/category.php on line 213
Thanks!
-Ludwing
Basically to gather help, we would need more infos.
1. which shopversion are you using
2. is the shop modified
3. whcih server type
4. which php-version
This just for a 'starting' point.
1. which shopversion are you using
2. is the shop modified
3. whcih server type
4. which php-version
This just for a 'starting' point.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
It's probably this part:
SELECT DISTINCT keyword FROM vv_url_alias WHERE query = 'category_id=56') AS keyword
You have multiple entries in your url_alias table for this category id. You can delete them via phpmyadmin and hope it's not returning because of some SEO extension or from an import maybe.
SELECT DISTINCT keyword FROM vv_url_alias WHERE query = 'category_id=56') AS keyword
You have multiple entries in your url_alias table for this category id. You can delete them via phpmyadmin and hope it's not returning because of some SEO extension or from an import maybe.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
you can add the following code to your query part : language_id = '" . (int)$this->config->get('config_language_id') . "'
before -> $query = $this->db->query("SELECT DISTINCT *, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'product_id=" . (int)$product_id . "') AS keyword FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
After -> $query = $this->db->query("SELECT DISTINCT *, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'product_id=" . (int)$product_id . "' and language_id = '" . (int)$this->config->get('config_language_id') . "') AS keyword FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
And Yippi. It solved issue.
before -> $query = $this->db->query("SELECT DISTINCT *, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'product_id=" . (int)$product_id . "') AS keyword FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
After -> $query = $this->db->query("SELECT DISTINCT *, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'product_id=" . (int)$product_id . "' and language_id = '" . (int)$this->config->get('config_language_id') . "') AS keyword FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
And Yippi. It solved issue.
Who is online
Users browsing this forum: No registered users and 32 guests