Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


ce7

Recommended Posts

Hi, 

How can I update the SQL (eg: products_id=14) for products_image =' ' in TABLE PRODUCTS, but make the TABLE PRODUCTS_IMAGES (products_id=14) not to be deleted in admin/categories.php?
tried many different ways, all will deleted the images in TABLE PRODUCTS_IMAGES ...
below codes said default image deleted but the image still remain in products_image in TABLE PRODUCTS:
$sql_data_array = array_shift ($pInfo->products_image);
tep_db_query("update products set products_image = 'no_image_available_150_150.gif ' where products_id = " . (int)$_GET['pID']);

below code will delete all the images in TABLE PRODUCTS and TABLE PRODUCTS_IMAGES
unlink(DIR_FS_CATALOG_IMAGES . $_POST['products_image']);
tep_db_query("update products set products_image = ' ' where products_id = " . (int)$_GET['pID']);
tep_db_query("update products set products_image = 'no_image_available_150_150.gif' where products_id = " . (int)$_GET['pID']);

once the main image be upload, there is no any way to delete the main image only, but in real world, the main product image could be old, and will be updated when is available, but all the other associated images (images in gallery) are still needed....

any help or suggetion is appreciated, thanks!

 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...