Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1030 - Got error 134 from table handler


Tonyukuk

Recommended Posts

Posted

While I am adding new products to my site suddenly my computer restarted. Then I take this error when I try to open my site.

 

1030 - Got error 134 from table handler

 

select p.products_id, 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 from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by pd.products_name

 

How can I fix my database

Posted

Try emptying your sessions table - use phpmyadmin - select the session table checkbox and click the 'empty' link on the right :)

 

Matti

Posted

Matti I have done that what you suggested and thx but it didnt fix my problem.

 

I get this quite a lot on 3 of my sites, on the same server package, seems to happen every weekend and when I toruble ticket it the hosts reply it is a sql server problem?

 

I have narrowed this problem down on my site to a query I modified on all three sites which when I disable the mod the site works, but with the mod it seems to work for a week then fubar very weird stuff, seems I need to redo my sql query.

 

Just thinking out loud, any further idea or ideas here is the offending query I think.

 

<?php

if(FEATURED_PRODUCTS_DISPLAY == 'true')

{

$featured_products_category_id = $new_products_category_id;

$cat_name_query = tep_db_query("select categories_name from categories_description where categories_id = '" . $featured_products_category_id . "' limit 1");

$cat_name_fetch = tep_db_fetch_array($cat_name_query);

$cat_name = $cat_name_fetch['categories_name'];

$info_box_contents = array();

 

if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) {

$info_box_contents[] = array('align' => 'left', 'text' => '<a class="headerNavigation" href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . TABLE_HEADING_FEATURED_PRODUCTS . '</a>');

 

list($usec, $sec) = explode(' ', microtime());

srand( (float) $sec + ((float) $usec * 100000) );

$mtm= rand();

 

$featured_products_query = tep_db_query("select pd.products_id, pd.products_description, p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' and p.products_id = pd.products_id order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

} else {

$info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY, $cat_name));

$featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_id, pd.products_description, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

}

 

Thx for any help if the query is fubar.

Posted

Just to add here is the query error which seems to point to the top half of the featured query;

 

select pd.products_id, pd.products_description, p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from products_description pd, products p left join specials s on p.products_id = s.products_id left join featured f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' and p.products_id = pd.products_id order by rand(1722794869) DESC limit 2

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...