Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database transfer failure


lfabio2008

Recommended Posts

Folks,

I've been running oscommerce 2.2 on CentOS for a while on a pre-production server. To move it into production, I moved it onto a Debian stable (4.0) machine. I copied over the 'catalog' directory, created the new database and loaded the latest backup I had (the .sql file) into it.

Everything works, except when I choose a category of merchandise, I get the error:

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

select count(distinct 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 = '39'

This leads me to believe that the .sql backup file was either incomplete or not loaded properly. For reference, I am using the standard debian stable packages (apache 2, php4, mysql5). I tried 'restoring' different db backups, both from the web interface and from the mysql commandline tool, with the same problem. Any ideas would be welcome.

Link to comment
Share on other sites

Folks,

I've been running oscommerce 2.2 on CentOS for a while on a pre-production server. To move it into production, I moved it onto a Debian stable (4.0) machine. I copied over the 'catalog' directory, created the new database and loaded the latest backup I had (the .sql file) into it.

Everything works, except when I choose a category of merchandise, I get the error:

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

select count(distinct 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 = '39'

This leads me to believe that the .sql backup file was either incomplete or not loaded properly. For reference, I am using the standard debian stable packages (apache 2, php4, mysql5). I tried 'restoring' different db backups, both from the web interface and from the mysql commandline tool, with the same problem. Any ideas would be welcome.

 

usual error when moving from mysql 4 to mysql 5.. check modules/products_new.php.. and there will be line with left join . TABLE_MANUFACTURERS .. it is a query.. please paste in the query and I will help you with the fix..

 

** Note it is most probably this file. if it some other file you will ahve to manually check each file :(..

 

cheers

Hari

Link to comment
Share on other sites

Thanks for your reply, first of all. You are correct, I found out, it seems to be a join query issue. Fortunately I found a patch, since I discovered that what had been installed was the 'oscomtemplate' fork... and the oscomtemplate (http://www.oscomtemplate.com/) people provide a fix here:

http://www.oscomtemplate.com/index.php?topic=2645.0

The topic is in italian, so I'll further add that the zipped you're directed to download file contains new versions of

index.php

all_products.php

admin/categories.php

diffing the files yields changes in some queries: if anyone is interested, I will post the details.

BTW, oscomtemplate 1.2a / 1.3 are still based on the old 2005 RC. Now I have to decide if it's better (?) to crossgrade to the new oscommerce RC or upgrade to oscomtemplate 1.3 .. oh well. That's another topic.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...