copy column

FilMar

Member
Maybe a stupid question but...

I have a list with names and 22 columns representing 'weeks' as Char(1) (W01,W02,...,W22).
I need a possibility to copy one week column to another.
Can I create a form in the header of the list with 2 fields (WeekFrom, WeekTo, best as dropdowns) and a button to build and execute an MySQL command?
Or is there a better/easier way to arrive at this?

A little update to make it more clear: I want to copy the week for all rows in the list.
As far as I can see with the list update_col plugin I can put the same value in multiple rows at once, that is not what I need.

Many thanks in advance,

Filip
 
Last edited:
There's no built in way to do this. But yes, I guess you could create a separate form (it wouldn't need a table, you could create it as just a form, with "record to database" set to No), then put a PHP submission plugin on it, and write some custom code to do the actual column copy, which would basically be a query like "UPDATE yourtable SET w01 = w02" or whatever, usiung the submitted values for the column names.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top