Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error Message on Products ver 2.2


rak1

Recommended Posts

Hi, Im running ver 2.2 Osc

Im getting this error when I make a Cat or add a Product???

 

Anyone had this or can Help with this and tell me how to fix it Please?

 

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

 

[TEP STOP]

 

====================================================================================================

 

Im Also getting this :

[ Warning: I am able to write to the configuration file: /home/jerdad/public_html/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. ]

 

I have tried setting it to 644 and 444 ???

 

Thanks for all help

Link to comment
Share on other sites

@@rak1

 

What release of 2.2 ? Is that MS2, Rc1 or Rc2a ?

 

 

More than likely, your server software has been updated and your site now needs to be updated to continue working.

 

 

 

Chris

Link to comment
Share on other sites

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

It sounds like your host has upgraded to MySQL 5, and your old osC needs updating to work with it. MySQL 5 changed some operator precedence (LEFT JOIN is now higher than COMMA). In this particular query, it would become

 

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

Similar changes would be needed in several other places (and obviously, in the .php source) -- do a search on this forum to find discussion on them.

Link to comment
Share on other sites

Thanks, the reason I was using this version is because I wanted to use a 2.x jewelry template I found, Is there a Fix for this ?

Or a another decent jewelry template around anywhere?

Thanks again

Link to comment
Share on other sites

@@rak1

 

What release of 2.2 ? Is that MS2, Rc1 or Rc2a ?

 

 

More than likely, your server software has been updated and your site now needs to be updated to continue working.

 

 

 

Chris

 

Hi Chris, If i update the cart will the template still work?

Thanks

Link to comment
Share on other sites

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

It sounds like your host has upgraded to MySQL 5, and your old osC needs updating to work with it. MySQL 5 changed some operator precedence (LEFT JOIN is now higher than COMMA). In this particular query, it would become

 

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

Similar changes would be needed in several other places (and obviously, in the .php source) -- do a search on this forum to find discussion on them.

 

Which is php file would this be in so I can change it?

Link to comment
Share on other sites

This is quite old, but may be enough for you: http://addons.oscommerce.com/info/3727

 

Really, you'd be better off installing 2.3.3 and moving your database content over. You're way behind the times, but if your site is heavily modified you might not want to risk losing features you depend on (if they're not available for 2.3.3). Anyway, it doesn't hurt to install a test version of 2.3.3 and database, and give it a try. There are probably templates now that support 2.3.3 -- be sure to check with the author or supplier. However, with "themeroller" you can easily change a lot of stuff in the 2.3.3 theme to make your site look the way you want, without going through the hassle of installing a "template" (which brings with it all sorts of problems).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...