Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

phpadmin deleting an image record


cczernia

Recommended Posts

I'm trying to figure out a way to remove images from my OSC site. So far I can't find a way to do it through OSC admin so I have decided the best way to do this is through phpadmin. However, I am unfamilier with SQL statement.

 

How would I tell the database to remove an entry to product_image for item x?

 

Or if anyone has another way of removing images I'd love to here it. Thanks in advance.

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

I'm trying to figure out a way to remove images from my OSC site. So far I can't find a way to do it through OSC admin so I have decided the best way to do this is through phpadmin. However, I am unfamilier with SQL statement.

 

How would I tell the database to remove an entry to product_image for item x?

 

Or if anyone has another way of removing images I'd love to here it. Thanks in advance.

Log into admin and replace it with the image you want, or a transparent gif if you want no images.

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Log into admin and replace it with the image you want, or a transparent gif if you want no images.

 

I think I need to demonstrate what I'm going for. Below is an example a category where none of the items received an image. Notice that each row is extremely narrow. I came up with this design after discovering a contribution that allows me to place an image above the items. As a result there are items that need to have the image removed. Replacing the image with a transparent image or deleting it in the directory will either cause a broken image or the rows will be the size of the items with images (in this case 150 x 150). I can't have 150 x 150 empty rows.

 

noimage.gif

 

The only way I can think of is to get rid of the image in the database. There is no way I know to do this in OSCadmin but an SQL statement in PHPadmin should work. Unfortunatly, I don't know how to write SQL. So, either the statment or even a guide to deleting a single entry of a single record would be helpful.

 

Thanks again.

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

Use Easy Populate (contrib) to download your catalog, remove mention of images where needed in the resulting spreadsheet and upload.

Link to comment
Share on other sites

update products set products_image = NULL where products_id  = ... the id you need

 

if you want to get rid of them all, use

update products set products_image = NULL

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...