Caliburn Posted April 25, 2009 Posted April 25, 2009 I have absolutely no knowledge of osCommerce, and only a little PHP and MySQL knowledge. But I've be given the job of moving an osCommerce site from an old machine to a (relatively) newer one. Old Machine MySQL 3.x PHP 4.x New Machine MySQL 5.0 PHP 4.x I've managed to solve most of the problems I've run into, but this one has me baffled. I'm not even sure how to ask the question. I think pictures might explain it better. The first one is on the old server, the way it SHOULD look. The second is how it looks with me trying to move it to the new server. So basically, a product is showing up several thousand times with different pictures. Some of them go to the product in the name, but not the picture. Some of them lead to non-existent products. Now from what I know, I'm guessing something changed between MySQL versions and screwed up one of the queries. But that's just a guess, and even if it's right I wouldn't know how to track down which one or how to fix it. Thoughts?
Jan Zonjee Posted April 25, 2009 Posted April 25, 2009 I've managed to solve most of the problems I've run into, but this one has me baffled. Looks like you changed the queries on index.php to cope with MySQL5 but fixed them wrongly. Probably this one here: // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " 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 " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
Caliburn Posted April 27, 2009 Author Posted April 27, 2009 Yes, I did change that code when I was replacing the p.products_id with p2c.products_id. I tried the code you posted there, however it's still doing the same thing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.