Jump to content

OSC 2.2 CVS MySQL 3 -> MySQL 5

Recommended Posts

The MySQL 3 and 4 -servers are going to be switched off. So I'm desperately trying to upgrade at least the used MySQL 3.23.58 to 5.6.19 in order to prolong its life till I have a complete new online shop.

I could succesfully import the old 3-database into the new 5-database.

But when clicking on categories or manufacturer this error appears:

1054 - Unknown column 'p.products_id' in 'on clause'

select count(*) as total from products p, products_description pd, manufacturers m left join 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 = '4' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '56'

I thought version 5 is compatible with 3 ?


Share this post

Link to post
Share on other sites

It's failing because the on clause is for manufacturers and specials but the code is referencing a product field. That can be changed but I think the more important question is if your code can handle the newer php version, which will be used with the new MySQL version. If your shop is using that old of a MySQL version then I suspect the code has not been updated to run with newer versions of php. It should run on, at least, 5.4 and even that is no longer supported. You would be better off switching to the latest oscommerce version.

Share this post

Link to post
Share on other sites

This might have something to do with an old problem about MySQL changing precedence of certain operations, so that 'p' is unknown at that point (search this forum for 1054). That might be a fairly simple Band-Aid fix you could do (it was years ago... I don't remember the particulars). Anyway, I agree with Jack that you're wasting your time trying to patch up such an old version of osC to work with (more) current MySQL (and PHP) versions. You'd be much better off biting the bullet and moving to osC "Frozen". Unfortunately, if you have a lot of code customization, you'll have quite a bit of work ahead of you, but in the long run it will be worth it. Converting even an ancient osC database to run on Frozen isn't a terrible amount of work, but you will then have a vanilla shop.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now