add multiples records in one time based on a criteria

Hi team,

I would like to create a procedure able to copy multiples records in one time based on a criteria of existing data.
in my case: copy all existing records where field_year=2018 AND field_month=07 TO new records where field_year=2018 and field_month=08
User must choose year and month to copy then year and month target
I don’t know exactly what sort of application to start with. Form ? Control ? Blank ? Search ?
Maybe i have to create the procedure entirely in PHP ?

Any help would be greatly appreciated. Newbie with Scriptcase but solid knowledge of PHP

All my best,
Philippe

just use a query with following syntax. Adjust the tablenames and WHERE data. To select the month and year you can add a custom datefield and only use the year and the month in your WHERE statement in the query below.

INSERT INTO this_table_archive SELECT * FROM this_table WHERE entry_date < ‘2011-01-01 00:00:00’