Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database Error - Nothing done


Daddyslipdisk

Recommended Posts

Posted

Ok,

I know how it ticks everyone off when you don't look for the answer first, but after going through 40+ pages of the 1146 errors. none of the fixes applied to my problem.

 

I didn't add any contributions to the store. The only thing we did was rearrange the categories because the top level was way too long. So we created new categories, moved some around, etc. The page looks fine (http://pcsurgeon.net.nz/catalog), but when you click on the top level categories to see the sub categories under them, we get the following error;

 

1146 - Table 'gum1poo1_osc4.CATEGORIES' doesn't exist

 

select distinct m.manufacturers_id, m.manufacturers_name from manufacturers m, products_to_categories p2c, products p, CATEGORIES c where c.parent_id = '1' and p2c.categories_id = c.categories_id and p2c.products_id = p.products_id and p.manufacturers_id = m.manufacturers_id order by m.manufacturers_name

 

[TEP STOP]

 

I looked the the database_tables.php file and it's defined correctly. Here's the excerpt from that file;

 

// define the database table names used in the project

define('TABLE_ADDRESS_BOOK', 'address_book');

define('TABLE_ADDRESS_FORMAT', 'address_format');

define('TABLE_BANNERS', 'banners');

define('TABLE_BANNERS_HISTORY', 'banners_history');

define('TABLE_CATEGORIES', 'categories');

define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

define('TABLE_CONFIGURATION', 'configuration');

define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

 

And then I went into MySQL, clicked on Repair to repair the database. That didn't work. Then I went into PHPMYAdmin and "refreshed" the categories table. That didn't work either.

 

Is there a quick fix for this? I really need help quick on this issue.

 

Daddylsipdisk

Posted

is there a reason you're using "CATEGORIES" instead of "categories" as this is how it's defined with the database_tables.php, What's the sql query from the php file that accesses the dbase?

Posted
is there a reason you're using "CATEGORIES" instead of "categories" as this is how it's defined with the database_tables.php, What's the sql query from the php file that accesses the dbase?

 

i didn't define anything. But the database_tables.php defines the difference between CATEGORIES and categories like I showed in my first post. I have no idea why it does that.

 

The SQL query is

 

SELECT *

FROM `categories`

LIMIT 0 , 30

 

So everything is right. Something wierd has happened though. Nothing was altered as far as table names or anything like that. As I said, the only thing we did was move some categories around and something got whacked out. And just to avoid any unnecessary posts, we moved the categories around via the catalog/admin area, not within PHPMyAdmin.

Archived

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

×
×
  • Create New...