Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-13 21:17:20

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

deleting images

Hi I installed a copy of a site I did from a database backup. The old site had loads of images.
The new one doesn’t. I can’t delete a lot of the image in the images tab though. not sure why, they are not being used anywhere. Any ideas why?


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2009-11-13 22:36:31

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: deleting images

DELETE FROM `txp_image` WHERE `txp_image`.`id` > 0 in phpMyAdmin should work.

Last edited by uli (2009-11-13 22:37:10)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2009-11-13 23:02:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: deleting images

kvnmcwebn wrote:

Any ideas why?

It might well be something like this.

Offline

#4 2009-11-14 13:19:28

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: deleting images

hi uli,
I tried running that and got this

Unknown column 'txp_image.79' in 'where clause'
DELETE FROM `txp_image` WHERE `txp_image`.`79` > 0

but when I tried that I think I found the problem I’m not sure how to fix it just yet but it might be a simple path change.


its a bad hen that wont scratch itself.
photogallery

Offline

#5 2009-11-14 13:34:52

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: deleting images

els it might be related to your problem. It’s the same version actually. But there are no uploaded images on the server, it’s just the entries in the database I’m trying to delete. Still not sure what the problem is, it wasn’t a paths issue.


its a bad hen that wont scratch itself.
photogallery

Offline

#6 2009-11-14 21:32:41

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: deleting images

If you want to delete all you image records, as in Uli’s post, this query should work:

truncate table txp_image;

If you’re using a prefix, then insert it before “txp_”.

Last edited by jm (2009-11-14 21:33:21)

Offline

#7 2009-11-15 12:42:21

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: deleting images

thanks jon,
that did the trick.
-best
kevin


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB