Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


musashi79uk

Recommended Posts

Posted

Hi,

I'm hoping that someone on here can help me. I've been editing a few files on our website at www.prosound-dj.com and I have managed to screw something up.

I've spent the best part of 12 hours to correct this to no avail. The error I get is:-

 

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

 

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8, p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_price4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 = '1059' and pd.products_id = '1059' and pd.language_id = '1'

 

[TEP STOP]

 

The error only appears when I try to add a product to the shopping cart. I can access account information, log in, view products, etc but cannot add an item to the shopping cart. I can see my shopping cart which is empty but cannot add products to it. Everything was working fine until yesterday but I can't see where I have gone wrong. The files I have changed are as follows:-

 

shopping_cart.php

includes/header.php

includes/languages/english/product_info.php

includes/classes/PriceFormatter.php

admin/feeders.php

admin/googlefeeder.php

admin/includes/languages/english.php

admin/includes/languages/english/feeders.php

admin/includes/boxes/tools.php

admin/includes/boxes/catalog.php

 

All of the other files are untouched. I've downloaded my SQL database and opened it in Excel. The products_id column appears to be there so any help that anyone can give would be much appreciated.

 

Many Thanks

 

Carl

Posted

so many topics about the

 

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

do the google search, if don't know how to use oscommerce forum search.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

Hi,

I'm hoping that someone on here can help me. I've been editing a few files on our website at www.prosound-dj.com and I have managed to screw something up.

I've spent the best part of 12 hours to correct this to no avail. The error I get is:-

 

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

 

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8, p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_price4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 = '1059' and pd.products_id = '1059' and pd.language_id = '1'

 

[TEP STOP]

 

The error only appears when I try to add a product to the shopping cart. I can access account information, log in, view products, etc but cannot add an item to the shopping cart. I can see my shopping cart which is empty but cannot add products to it. Everything was working fine until yesterday but I can't see where I have gone wrong. The files I have changed are as follows:-

 

shopping_cart.php

includes/header.php

includes/languages/english/product_info.php

includes/classes/PriceFormatter.php

admin/feeders.php

admin/googlefeeder.php

admin/includes/languages/english.php

admin/includes/languages/english/feeders.php

admin/includes/boxes/tools.php

admin/includes/boxes/catalog.php

 

All of the other files are untouched. I've downloaded my SQL database and opened it in Excel. The products_id column appears to be there so any help that anyone can give would be much appreciated.

 

Many Thanks

 

Carl

When your sql version is 5 or higher some of the oscommerce sql queries will not work.

So just google or search on this forum for mysql5 oscommerce patches.

 

or for this specific query:

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8, p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_price4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 = '1059' and pd.products_id = '1059' and pd.language_id = '1'

 

 

 

Replace the above query with following query

 

 

 

select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8, p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_price4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price 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 p2c.products_id = s.products_id where p.products_status = '1' and p.products_id = '1059' and pd.products_id = '1059' and pd.language_id = '1'

 

 

 

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.

Archived

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

×
×
  • Create New...