dspeak Posted September 19, 2013 Posted September 19, 2013 I am migrating my site from php4 to php5. I changed the ini file and can get to the home page. I can look at specials, contact us and everything else except catagories. When I click on a category I get the following error.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 left join categories c on c.categories_id = p2c.categories_id where c.categories_status = '1' and 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 = '469' [TEP STOP]
burt Posted September 19, 2013 Posted September 19, 2013 Covered 100s of times in the past 5 years. Google is your friend. https://www.google.com/search?q=1054+-+Unknown+column+'p.products_id'+in+'on+clause'+site:www.oscommerce.com/forums
MrPhil Posted September 20, 2013 Posted September 20, 2013 In a nutshell, you also upgraded to MySQL 5, which changed some precedence rules in queries, requiring you to add some parentheses to restore MySQL's precedence rules. Rather than spending time fixing up your old osC store, why don't you consider installing 2.3.3 and transferring your data over?
dspeak Posted September 20, 2013 Author Posted September 20, 2013 When my store was migrated, everything worked except product info. If I clicked on a category with sub-categories it worked fine. When I clicked on a subcategory or a category with no subs I got the error. I added the parentheses as noted by Burt and everything seems to work fine. Now the only problem I have is some of the orders are not showing up. I get a email confirmation but the order is not in admin, nor is the customer in admin. I have ran several tests myself and the orders have gone through, got the email and the order shows up in admin. I also created a new customer with new email thinking that maybe only new customers are not showing, but that one also showed in admin and I got the email confirmation. The missing admin orders are in the database. Any help is greatly appreciated and Burt, thank you so much for your help.
cesarbrod Posted February 21, 2014 Posted February 21, 2014 I am facing a related problem in my store www.casacinepoa.com.br/catalog In the first load, categories are shown and I know the database is being accessed as a "new product" shows up in the specific box on the left side. Clicking on the product or in any categories will clear the categories box (only the total will show from that point on) and any product is shown as non-existent. And I know for a fact they are in the database. In the admin interface, I can see all users but no products or categories. I am on 2.2 RC2a and I have done several layout customizations which would take me a lot of time to reproduce, so I am sticking with what I have and I am trying to solve this problem. Thanks to the posts here I was already able to solve all (I believe) of the PHP 4 to 5 migration issues. All further help is more than welcome! Cheers!
cesarbrod Posted February 21, 2014 Posted February 21, 2014 Although I have not been able to solve the problem yet, I was able to reproduce it in a fresh 2.3.3.4 install. After installing and testing the installation, I have downloaded and properly installed the Brazilian Portuguese files and SQL. Even setting the new language as default, it would not show up in the site. So, as this is a test environment, I deleted the English language using the admin interface. Now I got the exact same problem I have described, in a fresh install. So, somwhow I believe this is an internationalization related problem. Still digging in and looking forward for any help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.