Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 - Unknown column 'categories.parent_id' in 'on clause'


Guest

Recommended Posts

Posted

Hi.

 

I have the latest version os osc installed here and I have a feed file datafeed.php which I use on other shops, older versions.

On this site I get an error when running http://www.carucioare-copii.ro/datafeed.php :

1054 - Unknown column 'categories.parent_id' in 'on clause'

 

I've searched and found out it's related to an mysql5 incompatibility. The table exists in the database, I've ran "repair table" and the error is still there.

 

Does any one have any idea how to fix this? Do I need to post the datafeed.php file to see what it looks like?

 

Thank you so much.

Posted

Well, I found a solution, I don't know the technical explanation, but here it is: in the feed file there is a section

 

 

FROM " . TABLE_CATEGORIES . " ,

" . TABLE_PRODUCTS . " prd,

" . TABLE_PRODUCTS_DESCRIPTION . " AS prdsc,

" . TABLE_CATEGORIES_DESCRIPTION . " AS catdesccurrent,

" . TABLE_PRODUCTS_TO_CATEGORIES . " AS prdtocat

 

I modified it like this and it worked (added brackets):

 

 

FROM (" . TABLE_CATEGORIES . " ,

" . TABLE_PRODUCTS . " prd,

" . TABLE_PRODUCTS_DESCRIPTION . " AS prdsc,

" . TABLE_CATEGORIES_DESCRIPTION . " AS catdesccurrent,

" . TABLE_PRODUCTS_TO_CATEGORIES . " AS prdtocat)

 

Hopefully it will help other people too.

Archived

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

×
×
  • Create New...