Jump to content

OsCommerce Problems, really stuck now


bobbybrown

Recommended Posts

Hey guys,

I've installed OScommerce to my site and got it all up and running, then found an error message.

 

This is the error:

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

 

[TEP STOP]

 

I get it when trying to search for something or when clicking on the categories for my products, meaning that noone can access my products!

 

I've tried running querys in phpmyadmin but nothing works, I just get errors saying the fields don't exist.

I don't have a field in the products table called products_d.

 

I'm really confused why its happening, its a totally new fresh install of oscommerce.

 

If someone can help me get this sorted it would be really appreciated, I've tried everything I can think of.

 

Thanks for reading guys.

 

Dan

Link to comment
Share on other sites

Sounds like someone upgraded to version 5 of mysql without telling you.  JOIN and comma precedence changed -- you can't mix them anymore.

 

Use this:

 

select count(p.products_id) as total from 
products p on 
inner join products_to_categories p2c on ( p.products_id = p2c.products_id )
inner join products_description pd on (pd.products_id = p2c.products_id )
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  pd.language_id = '1' and p2c.categories_id = '58'

 

Though you many need to switch LEFT and INNER depending on your needs.

Link to comment
Share on other sites

Just tried it again with 4 more templates I downloaded.

Same error again!

 

Take a look:

http://girlynails.co.uk/shop/oscommerce-2.2rc2a/catalog/index.php

 

Error is:

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

 

[TEP STOP]

 

 

I'm really confused with this now, I've got until the weekend to get it done and thats only 4 full days.

I have absolutely no idea where I'm going wrong  :-\

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.