Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1054 - Unknown column error when viewing categories


mitchac

Recommended Posts

Hello,

 

I've done some research on this board in an attempt to locate a solution to this problem but haven't found anything. I'm running MySQL version 5.0.45 with PHP 4.4.7. Seems to be a change in the way JOIN is handled under MySQL v5 from v4 in the index.php (and maybe others) file. The version of my index.php file is v 1.1 2003/06/11 17:37:59. Here's the error:

 

Items in Category

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34'

 

How do I resolve this?

 

Thank you in advance.

Link to comment
Share on other sites

Hello,

 

I've done some research on this board in an attempt to locate a solution to this problem but haven't found anything. I'm running MySQL version 5.0.45 with PHP 4.4.7. Seems to be a change in the way JOIN is handled under MySQL v5 from v4 in the index.php (and maybe others) file. The version of my index.php file is v 1.1 2003/06/11 17:37:59. Here's the error:

 

Items in Category

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34'

 

How do I resolve this?

 

Thank you in advance.

 

 

I have no idea if this will work, but I have corrected some mysql5 glitches by surrounding column descriptions by parentheses, like this:

 

 

select count(p.products_id) as total from (products_description pd, products p) left join (manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c) left join (specials s on p.products_id = s.products_id) where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34'

Link to comment
Share on other sites

I have no idea if this will work, but I have corrected some mysql5 glitches by surrounding column descriptions by parentheses, like this:

 

 

select count(p.products_id) as total from (products_description pd, products p) left join (manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c) left join (specials s on p.products_id = s.products_id) where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34'

 

This is what I've done to this point after downloading the 2.2rc2a release (I'm on 2.2.2):

 

1. Replaced the catalog/index.php file

2. Replaced the catalog/advanced_search_result.php file

 

This has solved the problem on the pages known to me but I will continue this methodology as there may be other pages in the admin area suffering from the same error.

Link to comment
Share on other sites

This is a bu related to mysql 5.

Apply mysql 5 patches.

 

Regards,

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...