Guest Posted November 17, 2007 Posted November 17, 2007 Hello, When clicking on the categories in the left column I'm getting following, 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 = '28' [TEP STOP] http://www.koolkatjazz.com/catalog/index.php/cPath/28 All this seam to happen after I tried to install following contribution "Simple Visitor Newsletter with HTML Support" http://addons.oscommerce.com/info/5196 I did backup before installation and I did restore but no change. Please help Thank you Peder Beckman
♥geoffreywalton Posted November 17, 2007 Posted November 17, 2007 try google 1054 - Unknown column 'p.products_id' in 'on clause' Seems to point to several solutions Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Guest Posted November 18, 2007 Posted November 18, 2007 try google 1054 - Unknown column 'p.products_id' in 'on clause' Seems to point to several solutions I found a fix. Thank you
digilee Posted November 18, 2007 Posted November 18, 2007 ... and the fix was ...? SolarFrenzy Solar powered gadgets at down to earth prices. CheekyNaughty Promoting British Design
Guest Posted November 18, 2007 Posted November 18, 2007 ... and the fix was ...? First, open "index.php" in an html editor and do this: QUOTE 1. If you have searched and replaced all the p.products_id = s.products_id with p2c.products_id = s.products_id and are getting the error: 1054 - Unknown column 'p2c.products_id' in 'on clause' then look for the line (NOTE: there are two lines starting with //We show them all comment you want the first one.) // 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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; and change it to: // 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_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; 2. If you are getting 1054 - Unknown column 'p.products_id' in 'on clause' then replace p.products_id = s.products_id with p2c.products_id = s.products_id EXCEPT on the line specified in #1 above. Then open "advanced_search_results.php" in an html editor and do this: QUOTE I change this code: $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; with: $from_str = "from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
Recommended Posts
Archived
This topic is now archived and is closed to further replies.