Jump to content

Recommended Posts

Добрый день всем!

Версия магазина: ocStore v1.5.4.1

Хостинг у хостера.

Ситуация такая, пишу какое нибудь слово в поиск, а оно выдаёт такую ошибку:

Notice: Error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Error No: 1104
SELECT COUNT(DISTINCT p.product_id) AS total FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (LCASE(pd.name) LIKE '%комплект пружин%' OR MATCH(pd.tag) AGAINST('комплект пружин')) OR LCASE(p.model) = 'комплект пружин' OR LCASE(p.sku) = 'комплект пружин' OR LCASE(p.upc) = 'комплект пружин' OR LCASE(p.ean) = 'комплект пружин' OR LCASE(p.jan) = 'комплект пружин' OR LCASE(p.isbn) = 'комплект пружин' OR LCASE(p.mpn) = 'комплект пружин' in /home/l/llcmskru/sport/public_html/system/database/mysql.php on line 49

Может кто подскажет в чем проблема?

Share this post


Link to post
Share on other sites

Сделал как тут написано

У кого вылазит такая ошибка

Notice: Error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okayнужно в файл admin/model/tool/export.php после строки

$query .= "ORDER BY p.product_id, pc.category_id; ";вставить

mysql_query("set sql_big_selects=1");и все заработает

Но не помогло, все равно выводится эта ошибка.

Share this post


Link to post
Share on other sites

Починил поиск. Кому интересно, распишу что я сделал:

1. Ищем файл category.php, его можно найти по пути /catalog/model/catalog/category.php

2. Добавляем туда строчку этого кода:

mysql_query("set sql_big_selects=1");

после строк кода:

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1' ORDER BY c.parent_id, c.sort_order, cd.name");

и вставляем ещё сюда после:

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category_to_layout WHERE category_id = '" . (int)$category_id . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "'");

3. Чистим кэш. Должно заработать!

Есть ещё второй способ, может он даже лучше. Ищем файл mysql.php, он находится /system/database/mysql.php.

Добавляем:

mysql_query("set sql_big_selects=1");

после:

mysql_query("SET SQL_MODE = ''", $this->link);

Edited by deluxstyle

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.