This is a discussion on Categories.php bugfix for larger stores within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; We had posted a message or two here about a handler error. We have over 10,000 products that are cross-linked ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| We had posted a message or two here about a handler error. We have over 10,000 products that are cross-linked in categories so much that the sql query on mysql 4.0 crapped out and gave a false 1028 table handler error. I think larger stores will see this in the future. The fix is here. In categories.php, change this: $products_query = tep_db_query("select p.products_ship_price, p.products_id, p.products_model, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' or p.products_model like '%" . tep_db_input($search) . "%' order by pd.products_name"); to this: $products_query = tep_db_query("select p.products_ship_price, p.products_id, p.products_model, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id INNER JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ON p.products_id = p2c.products_id where pd.language_id = '" . (int)$languages_id . "' and pd.products_name like '%" . tep_db_input($search) . "%' or p.products_model like '%" . tep_db_input($search) . "%' order by pd.products_name"); This will prevent categories admin page searches from timing out or filling up the /tmp directory and giving 1028 error. Thanks to Eric!
__________________ Paul |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bugfix 85-checkout_shipping_address checkout_payment_address | kenlyle | osCMax v2 Features Discussion | 1 | 01-05-2006 08:56 AM |
| larger colums? | amilo | osCMax v1.7 Discussion | 2 | 02-29-2004 02:49 AM |
| Larger left_column? | amilo | osCMax v1.7 Discussion | 0 | 01-20-2004 11:38 PM |
| [BugFix] v1.5 Category Descriptions Bug | michael_s | osCMax v1.7 Discussion | 0 | 09-25-2003 10:50 PM |
| [BugFix]Change Currenices From product_info.php failing | michael_s | osCMax v1.7 Discussion | 0 | 09-06-2003 11:55 AM |