lucilue2003 Posted March 14, 2007 Posted March 14, 2007 Hello, I purchased a template from templatemonster that has osc built in and i'm having a problem. Everytime you click on a category name, I get an sql error. The thing is that it works fine on a friends server. Same template . Same upload. The only thing that can be different is the mysql version or php version. However, can you please confirm if the sql syntax is correct... Here is what its spitting out when you click on a category..... 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 = '24' Thanks. http://www.wannabuyalaptop.com/index.php?cPath=24
lucilue2003 Posted March 14, 2007 Author Posted March 14, 2007 Here is the code in the index.php page that is generating this problem i believe: // 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, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_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 = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
satish Posted March 14, 2007 Posted March 14, 2007 well apply the lastews osc patches. 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.
lucilue2003 Posted March 14, 2007 Author Posted March 14, 2007 Which patch ? I downloaded the latest osc and read the documentation but it says nothing of upgrading.... Please advise. Thanks
Andrew Yuen Posted March 14, 2007 Posted March 14, 2007 Have you tried downloading the latest version of osCommerce from http://www.oscommerce.com/solutions/downloads, opening the mysql file, deleting your database and reupload the new mysql file? Your error is caused by a missing column in your database. Note: the mysql file is located under the install folder and is called oscommerce.sql I assume that your store has no products/customers, if it does you cannout use this method if you do you will loose your data. Andrew Yuen osCommerce, Community Team
Guest Posted March 14, 2007 Posted March 14, 2007 Have you tried downloading the latest version of osCommerce from http://www.oscommerce.com/solutions/downloads, opening the mysql file, deleting your database and reupload the new mysql file? Your error is caused by a missing column in your database. Note: the mysql file is located under the install folder and is called oscommerce.sql I assume that your store has no products/customers, if it does you cannout use this method if you do you will loose your data. I doubt there is a missing column from the database. He uses an old osc version and the host has mysql5x. The fact that the problem came up after the template installation leads me to believe those templates are simply outdated and do not include the osc updates. So you need to follow the manual instructions in the osc archive from the downloads section and update your store as mentioned by satish earlier.
lucilue2003 Posted March 14, 2007 Author Posted March 14, 2007 Hey guys thanks for the support. Just thought i'd share my solution with everyone. I came across it after much googling.... http://www.oscommerce.com/ext/update-20051...l#_Toc119473702 Enjoy...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.