Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

sql error


Recommended Posts

i get this error when i click on a category that has only subcategories, but no items.


to see the error go to my site http://www.plumber.ac and click on Faucets in the categories infobox. notice that the "for Builders" category and the "valves" categories work because they have products in them. the subcategories of faucets works because there are products there too, but instead of showing the subdategories when you click on faucets you see this error:


1146 - Table '****_osc2.CATEGORIES' doesn't exist (i inserted the *)


select distinct m.manufacturers_id, m.manufacturers_name from manufacturers m, products_to_categories p2c, products p, CATEGORIES c where c.parent_id = '21' 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


what's wierd is that if i change CATEGORIES (uppercase) to categories (lower case), the SQL statement goes through (running the sql on the database through phpmyadmin). can anyone tell me why the table name categories is CATEGORIES and where i can change it? i already checked database_tables.php and it's lowercase in there. thanks in advance.


i've installed the Dhtml-coolmenu contrib for the categories menu. thanks again for any advice.

Link to comment
Share on other sites

you will need to scan your code for CATEGORIES so i suggest youi download your whole site to your localsystem and then using windows grep or something like that, search for 'CATEGORIES' using the match cace function

Link to comment
Share on other sites

i tracked down which contribution had the bad SQL in it if anyone cares.


it was Categorical Manufacturers v1.1, there is an sql fix posted for that contribution but it still had the error.


the error was that in one of the sql statements CATEGORIES was used instead of TABLE_CATEGORIES. maybe that's the way it's supposed to be. i'm no expert, but when i changed that in my manufacturers.php file the problem went away.

Link to comment
Share on other sites

  • 3 weeks later...

i still had the same problem, but finally fixed it. I thought at first it was the problem with the categories.php file because i've changed that one with some oscommerce contribution. But the error was in the manufactures.php file.


Link to comment
Share on other sites


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

  • Create New...