Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sassa

Pioneers
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Real Name
    Sassa Wicky
  • Gender
    Female

Sassa's Achievements

  1. Hi I hope someone can help me. I want to transfer my images from a previous contributions "Extra images - http://addons.oscommerce.com/info/1289". I've tried to alter the sql accordingly below that I found in a previous post but have not succeeded. require('includes/application_top.php'); $sess_id = (tep_not_null(SID)); $sql_raw = 'select products_id, products_image_array, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6 from ' . TABLE_PRODUCTS; $product_query = tep_db_query($sql_raw);$n=0; while ($products = tep_db_fetch_array($product_query)) { $products_image_array = unserialize($products['products_image_array']); if (!is_array($products_image_array)) $products_image_array = array(); for ($i = 1; $i <= 6; ++$i) { $image = $products['products_subimage' . $i]; if (tep_not_null($image)) { $products_image_array[] = $image; $n++; } } $sql_data_array['products_image_array'] = serialize($products_image_array); tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products['products_id'] . "'"); } die("<center><br><br><b>Completed image transfer process, transfered " . $n . " product images to Multi Image Add-On data array.</b></center><br><br>"); ?> My image links are in a separate table called "products_extra_images" and the columns are products_id products_extra_image products_extra_images_id Have tried everything but nothing works. Sorry for my bad English, hope you understand me:)
  2. Hi I hope someone can help me. I want to transfer my images from a previous contributions "Extra images - http://addons.oscommerce.com/info/1289". I've tried to alter the sql accordingly below that I found in a previous post but have not succeeded. require('includes/application_top.php'); $sess_id = (tep_not_null(SID)); $sql_raw = 'select products_id, products_image_array, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6 from ' . TABLE_PRODUCTS; $product_query = tep_db_query($sql_raw);$n=0; while ($products = tep_db_fetch_array($product_query)) { $products_image_array = unserialize($products['products_image_array']); if (!is_array($products_image_array)) $products_image_array = array(); for ($i = 1; $i <= 6; ++$i) { $image = $products['products_subimage' . $i]; if (tep_not_null($image)) { $products_image_array[] = $image; $n++; } } $sql_data_array['products_image_array'] = serialize($products_image_array); tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products['products_id'] . "'"); } die("<center><br><br><b>Completed image transfer process, transfered " . $n . " product images to Multi Image Add-On data array.</b></center><br><br>"); ?> My image links are in a separate table called "products_extra_images" and the columns are products_id products_extra_image products_extra_images_id Have tried everything but nothing works. Sorry for my bad English, hope you understand me:)
×
×
  • Create New...