keithschm Posted October 12, 2007 Share Posted October 12, 2007 $listing_sql = "select p.products_image, pd.products_name, 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 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 = '$current_category_id' order by pd.products_name limit 3"; Since my host switched to PHP 5 this query does not work and I get the "1054 - Unknown column 'p.products_id' in 'on clause'" I was able to fix most sections of the site but this query. any help would be appreacated Thanks Link to comment Share on other sites More sharing options...
knifeman Posted October 12, 2007 Share Posted October 12, 2007 $listing_sql = "select p.products_image, pd.products_name, 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 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 = '$current_category_id' order by pd.products_name limit 3"; Since my host switched to PHP 5 this query does not work and I get the "1054 - Unknown column 'p.products_id' in 'on clause'" I was able to fix most sections of the site but this query. any help would be appreacated Thanks See if this helps: http://www.oscommerce.com/community/contributions,4654 Link to comment Share on other sites More sharing options...
keithschm Posted October 12, 2007 Author Share Posted October 12, 2007 See if this helps:http://www.oscommerce.com/community/contributions,4654 Thanks I had allready done that, but this query is a little differnt, and I can not figure out how to fix it Link to comment Share on other sites More sharing options...
knifeman Posted October 12, 2007 Share Posted October 12, 2007 Thanks I had allready done that, but this query is a little differnt, and I can not figure out how to fix it Keith, See my post HERE. It shows how I managed to make the update work on all products page. I believe you can alter this query the same way. Notice the "(" at the end of the third line and the ")" in the middle of the 6th line. I honestly do not know what that does, but I ciphered out that change from the index.php change. Tim Link to comment Share on other sites More sharing options...
keithschm Posted October 13, 2007 Author Share Posted October 13, 2007 Keith, See my post HERE. It shows how I managed to make the update work on all products page. I believe you can alter this query the same way. Notice the "(" at the end of the third line and the ")" in the middle of the 6th line. I honestly do not know what that does, but I ciphered out that change from the index.php change. Tim worked like a charm Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.