[RISOLTO] 1104 - The SELECT would examine more than MAX_JOIN
Moderatore: mod Documentazione
[RISOLTO] 1104 - The SELECT would examine more than MAX_JOIN
nella pagine del prodotto in basso mi è uscito questo errore:
1104 - 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
select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '2991' and opa.orders_id = opb.orders_id and opb.products_id != '2991' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 6
[TEP STOP]
che può essere?
Boh!
grazie a tutti
1104 - 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
select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '2991' and opa.orders_id = opb.orders_id and opb.products_id != '2991' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 6
[TEP STOP]
che può essere?
Boh!
grazie a tutti
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
Ciao Pasquale,Bross ha scritto:nella pagine del prodotto in basso mi è uscito questo errore:
1104 - 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
select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '2991' and opa.orders_id = opb.orders_id and opb.products_id != '2991' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 6
[TEP STOP]
sembra che hai parecchi prodotti sul tuo shop ...
Apri il file catalog/includes/modules/also_purchased_products.php
Trova il codice:
Codice: Seleziona tutto
if (isset($HTTP_GET_VARS['products_id'])) {
$orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);
e sostituisci con.
Codice: Seleziona tutto
if (isset($HTTP_GET_VARS['products_id'])) {
$set_query = tep_db_query("SET SESSION SQL_BIG_SELECTS=1;");
$orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);
Saluti
Marcus
Ultima modifica di marcus il 05/06/2008, 22:33, modificato 3 volte in totale.
Nuovo pacchetto osCommercePRO (osCPRO) + Modulo Interfacciamento Gestionale Danea.
Visita la demo: http://oscpro.oscommercedev.com/index.php
Visita la demo: http://oscpro.oscommercedev.com/index.php