Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-31 13:08:12

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

How can I delete custom field data

I would like to delete for all articles the data in the custom field custom_1. How can I do that?

And later I would like to move the data from custom_2 to custom_1. I looked with phpMyAdmin in the database, but I could not figure out how I do that.

Offline

#2 2012-03-31 13:25:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,258
Website GitHub Mastodon Twitter

Re: How can I delete custom field data

adi matrix will be of help


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2012-03-31 14:01:48

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: How can I delete custom field data

For emptying custom field n1 across all articles, run a query:

UPDATE textpattern SET custom_1=''

To move data from custom_2 to custom_1:

UPDATE textpattern SET custom_1=custom_2, custom_2='' WHERE custom_1='' AND custom_2 != ''

Obviously, please backup before you do run those, in-case of error. Neither of is tested, but should probably work just fine. You can run those from your said phpMyAdmin at the SQL pane.

Offline

#4 2012-03-31 16:14:13

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: How can I delete custom field data

@ colak:

Thank you for this reference. An interesting plugin, but for my purpose it is not the best solution, because each field must be clicked individually.

@ Gocom:

Many thanks. This is the solution I was looking for. I will try it soon.

Offline

Board footer

Powered by FluxBB