Guest Posted February 12, 2007 Share Posted February 12, 2007 Ia am getting Error 1054 - Unknown column 'p.products_id' in 'on clause'. In my DB, what table or such do I add an additional line? Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2007 Share Posted February 12, 2007 Ia am getting Error 1054 - Unknown column 'p.products_id' in 'on clause'.In my DB, what table or such do I add an additional line? hi - you need to post the error, and the entire select stattment Corrie Link to comment Share on other sites More sharing options...
crash3903 Posted February 12, 2007 Share Posted February 12, 2007 Ia am getting Error 1054 - Unknown column 'p.products_id' in 'on clause'.In my DB, what table or such do I add an additional line? Is this in your home page or when you try to view a category? If so in your index.php file found in your root folder, search for p.products_id after the on clause - change it to read p2c.products_id Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2007 Share Posted February 12, 2007 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' I have subcategories in my product folders. A typical hearchy would be: Military -> Tanks-> German or US -> then the different models of each. Once you click on the lowest folder then the Error is seen. I do not have category pics for everything right now so i am using the same clear.gif when one is requested. Thanks in advance. Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2007 Share Posted February 12, 2007 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' Once you click on the lowest folder then the Error is seen. I do not have category pics for everything right now so i am using the same clear.gif when one is requested. very strange. are you sure this is the correct statement ? can you please run this in your sql query window and see if you get results, or errror : 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 Do you have loads of mods installed ? Corrie Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2007 Share Posted February 12, 2007 How do I run what and how in my sql server? This is my second endeavor with Php and I am really learning a lot here. Here click on the the lowest sub category: http://american-rc.com/osc/catalog/index.php Thanks. Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 12, 2007 Share Posted February 12, 2007 Take a look at this. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2007 Share Posted February 12, 2007 Bravo Jack! It's Alive! My Perl friend just recommended 'Build Your own DB Driven Website using PHP and MySQL' by Kevin Yank. So how do I use the MySql server to run queries as Corrie mentioned? I want to learn. Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 12, 2007 Share Posted February 12, 2007 The easiest way is to use phpmyadmin, which is a program installed by most hosts. See this thread. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
ashiegirl86 Posted February 20, 2007 Share Posted February 20, 2007 I'm having the same problem!!! The thing is, I'm running the latest version of osCommerce, and the bug report says it was fixed. I think it has something to do with a page that I uploaded when I was installing BTSv1.4 (the latest version, whichever that is). What page needs to be changed? It has to be one of the root files, right? Which page? What do I change? Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 20, 2007 Share Posted February 20, 2007 The fix mentioned in the link I posted above is for the index page. But there are several contributions that have the same problem. You have to fix those as you run across them. When the error occurs, see what file is being used by looking at the url. Then look in that file for an sql statement that matches the one in the error. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
ashiegirl86 Posted February 22, 2007 Share Posted February 22, 2007 Thanks, Jack. I've got that fixed, but now there's a similar error on the advanced_search_result.php page. I have yet to find a fix for that. The ones I saw say to change lines of code that aren't on the page at all. I did a search for 'laser' because the store is for ink cartridges. 1054 - Unknown column 'p.products_id' in 'on clause' select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%laser%' or p.products_model like '%laser%' or m.manufacturers_name like '%laser%') ) Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 22, 2007 Share Posted February 22, 2007 The problem is the same but the code is different. You need to appply the fix described in the text in order to fix it. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2007 Share Posted February 22, 2007 Got it done. Thanks again jack. Link to comment Share on other sites More sharing options...
jasonabc Posted February 22, 2007 Share Posted February 22, 2007 Thanks, Jack. I've got that fixed, but now there's a similar error on the advanced_search_result.php page. I have yet to find a fix for that. The ones I saw say to change lines of code that aren't on the page at all. I did a search for 'laser' because the store is for ink cartridges. I hope Abra's not possessive over her profile pic... :lol: http://www.oscommerce.com/forums/index.php?showuser=96386 Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.