Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping Cart HELP "1054-Unknown column"


brent85_98

Recommended Posts

Can anyone tell me what this means. Our shopping cart was working last week now we are getting this error message. We need to get it fixed so we can still do business. Thanks! Please help...

 

http://www.lovingtouch.com/catalog/index.php?cPath=21_27

 

This is the message:

 

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

 

[TEP STOP]

Link to comment
Share on other sites

Down load the latest copy of oscommerce and run the update. The update file is located in your download.

 

You have an older version of oscommerce and an updated version of php and mysql

 

 

Is this the unreal.zip file in the download folder?

Link to comment
Share on other sites

No, it is the update-20060817.txt. before your even open the catalog.

 

The unreal.zip is a demo for downloading music or files from your live catalog

 

 

 

 

Is this the unreal.zip file in the download folder?
Link to comment
Share on other sites

No, it is the update-20060817.txt. before your even open the catalog.

 

The unreal.zip is a demo for downloading music or files from your live catalog

 

I installed the latest and checked the update text as mentioned. Problem still the same.:

 

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

 

 

Please anyone?

Link to comment
Share on other sites

You did not say which page you are getting the errors on There should be 3 possabilities so let me know.

 

Index or the categories or advanced search?

 

I am receiving this same error under "categories". I am running MySQL 5.0.22

 

Thanks,

Olafur

Link to comment
Share on other sites

Open your index.php and look for the second reference of //we ask you to show them all. On a unmodifed index you would see this around line 186.

 

replace your code with this. (there are just a few word changes but I work templates and just replace the old code the easy way.

 

Back up first.

 

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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 " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

 

Chances are you will receive errors in advanced search unless updated.

 

 

I am receiving this same error under "categories". I am running MySQL 5.0.22

 

Thanks,

Olafur

Link to comment
Share on other sites

Open your index.php and look for the second reference of //we ask you to show them all. On a unmodifed index you would see this around line 186.

 

replace your code with this. (there are just a few word changes but I work templates and just replace the old code the easy way.

 

Back up first.

 

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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 " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

 

Chances are you will receive errors in advanced search unless updated.

 

 

Yes, fixed! Thanks.

Link to comment
Share on other sites

This worked great with the categories, but I'm still getting the 1054 error on the manufacterers.. I guess you need a different "// We show them all" edit on the first of the two?

Link to comment
Share on other sites

You simply need to do an update. Download the latest version of oscommerce and inside the package you will find the "update-20060817.txt".

 

This has not only a patch for the newer versions of php and mysql but security patches as well, so don't just find your immediate solution but complete the whole update.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...