Jalho - Just a little help online is in labs these days, its going to be free online event management portal for public to easily setup and manage their events, invite guests and service providers. Handling recurring events is integral part of any event management system, while writing cron job for event refresh I came across an interesting feature of MySQL that helps easily copying one row to new one, which actually saved me lot of time.
Below is query to easily copy row :
insert into table(col1,col2,col3,col4) select (col1,col2,col3,col4) from table where condition;
Another interesting feature was ability to insert different values in columns, as with each refresh event start date changed so I have wrote query to copy other columns as it is but insert new date in event start date.
insert into table(col1,col2,col3,col4,event_start_date) select (col1,col2,col3,col4,'2008-02-19') from table where condition;
Its better to pass column list to avoid errors of duplicate id in query, however if your table dont have any auto increment / primary key or you want to copy in different table you can pass and select "*" instead of columns. That will copy all columns including any auto incremented values.