Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL error: 1054 - Unknown column 'p.products_id' in 'on clause'


Futterama

Recommended Posts

Hello forum,

 

I'm helping a friend with this problem in his webshop. The welcome page to the shop in www.mydomain.dk/catalog/ works fine, but when you want to see one of the product categories, this error is displayed:

 

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 = '4' and p2c.categories_id = '29'

 

[TEP STOP]

 

I logged in to his MySQL phpMyAdmin tool, and I get the same error when executing the SQL statements from there.

 

His host is unoeuro.com if this matters to you.

 

I hope someone can help us.

 

Thanks in advance.

 

Regards,

Futterama

Link to comment
Share on other sites

Try:

 

select count(p.products_id) as total

from products_description pd,

products_to_categories p2c,

products p

left join manufacturers m on p.manufacturers_id = m.manufacturers_id

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 = '4'

and p2c.categories_id = '29'

 

Nicki

Nicki Tang

Link to comment
Share on other sites

  • 2 weeks later...
Try:

 

select count(p.products_id) as total

from products_description pd,

products_to_categories p2c,

products p

left join manufacturers m on p.manufacturers_id = m.manufacturers_id

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 = '4'

and p2c.categories_id = '29'

 

Nicki

 

Thanks for your suggestion, but since the files have not been modified, something else must be wrong. What happened to the post saying that I needed to upgrade osCommerce because of a newer MySQL server version?

 

 

Regards,

Futterama

Link to comment
Share on other sites

It is usually a problem with MySQL5. Do you know what version you are running?

 

Rob

Rob Bell - Inspired Graphix

Customising osCommerce in Australia, and the world!

View my profile for web and email links.

 

I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture.

However viewing my profile may provide links to my website or something like that which you may find useful.

Link to comment
Share on other sites

Thanks for the fast replies.

 

The MySQL server is 5.0.27-standard.

 

The last comment in Jacks suggestion: "This was fixed with the 2.2 Milestone 2 051113 Update package."

 

So if I update my osCommerce installation to the latest, the problem will go away.

 

But I'm having trouble figuring out how to upgrade. I made a topic about it here: http://www.oscommerce.com/forums/index.php?showtopic=251905

 

 

Regards,

Futterama

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...