Home Forums Event Espresso Premium simplified mysql to copy event

simplified mysql to copy event

Posted: July 28, 2020 at 11:41 am


July 28, 2020 at 11:41 am

Hi, what mysql table data is cloned when an event is duplicated. Im trying not to move away from ee4 but the recurring events is an issue and may have to duplicate over 700 events in the next few weeks. I was going to create a script to automate this as each day has effectively the same events and tickets each day Monday – Sunday. It is essentially booking football pitches by the hour. Is there a better work flow?



  • Support Staff

July 28, 2020 at 2:00 pm

Hi Wayne,

What you are trying to do isn’t as simple as it sounds (which is why we don’t have a simple workaround for rem right now).

Multiple tables are used for each and every EE event.

Some examples, (assuming the DB prefix is wp_) the post itself is stored within wp_posts.

The datetimes for that event will be in wp_esp_datetime

The tickets for the event in wp_esp_ticket

The relationship between the datetimes and tickets in wp_esp_datetime_tickets

Trying to manually do this with your own query is not simple by any means, you would be better taking a look at how the _duplicate_event function (the function called when you click the button) duplicates the event using our models (which then handle all of the queries/relationships for you.


July 28, 2020 at 2:17 pm

Hi Tony, thanks for your speedy response – im not sure the least painful approach. is it best to do each day so 300+ events with hourly tickets or what I have been trying which is to have one event per day, i.e Monday with multiple event date times with each having multiple available tickets on the hour. This seems easier from the admin but from what I can see does not look the simplest from a ux point of view
see. What would be your recommended workflow?


  • Support Staff

July 29, 2020 at 6:29 am

I can’t view those images currently although from what you’ve mentioned so far, I would likely use daily events as its easier for the main to “today’s” registrations that way.

So for example you’d go to Event Espresso -> Events

Load today’s registrations and export the report for a list of only today’s registrations, no selecting datetimes etc.


July 29, 2020 at 6:38 am

Yes have opted for a daily event with hourly tickets- doing multiple event dates are all seen as one event and not separate. The pain is there are 4 events x 9 hourly slots of which sale times need updating per day for a year. My maths makes it 131k edits ((4*9)*365) over the year so will probably add hack a button in the admin to update date times using js once duplicated and create some kind of automated function.


  • Support Staff

July 29, 2020 at 6:50 am

Or, you could hook into the function I mentioned above (there’s a few hooks in that function to do the above) and do this via PHP when the button is clicked.

Doing this after the duplicate button is clicked with JS is doable but personally, rather than hacking something in JS I’d just use PHP to set the dates on the fly.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 2 months, 4 weeks ago ago

Topic Tags



This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[gravityform id=80 title=false description=false ajax=false]
<div class='gf_browser_unknown gform_wrapper' id='gform_wrapper_80' ><form method='post' enctype='multipart/form-data' id='gform_80' action='/topic/simplified-mysql-to-copy-event/'> <div class='gform_body'><ul id='gform_fields_80' class='gform_fields top_label form_sublabel_below description_below'><li id='field_80_1' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_1' >First name<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_1' id='input_80_1' type='text' value='' class='medium' aria-required="true" aria-invalid="false" /></div></li><li id='field_80_2' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_2' >Email address<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_email'> <input name='input_2' id='input_80_2' type='email' value='' class='medium' aria-required="true" aria-invalid="false" /> </div></li><li id='field_80_3' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >GDPR Agreement<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_checkbox'><ul class='gfield_checkbox' id='input_80_3'><li class='gchoice_80_3_1'> <input name='input_3.1' type='checkbox' value='I consent to have this website store my submitted information so they can respond to my inquiry.' id='choice_80_3_1' /> <label for='choice_80_3_1' id='label_80_3_1'>I consent to have this website store my submitted information so they can respond to my inquiry.</label> </li></ul></div></li><li id='field_80_4' class='gfield gform_validation_container field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_4' >Email</label><div class='ginput_container'><input name='input_4' id='input_80_4' type='text' value='' autocomplete='off'/></div><div class='gfield_description' id='gfield_description_80_4'>This field is for validation purposes and should be left unchanged.</div></li> </ul></div> <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_80' class='gform_button button' value='Download Now' onclick='if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} jQuery("#gform_80").trigger("submit",[true]); }' /> <input type='hidden' class='gform_hidden' name='is_submit_80' value='1' /> <input type='hidden' class='gform_hidden' name='gform_submit' value='80' /> <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> <input type='hidden' class='gform_hidden' name='state_80' value='WyJbXSIsIjBiNjdjZjkyMDUzOWUxOWY5Y2NiZjIwMzM4YjA1Mjk4Il0=' /> <input type='hidden' class='gform_hidden' name='gform_target_page_number_80' id='gform_target_page_number_80' value='0' /> <input type='hidden' class='gform_hidden' name='gform_source_page_number_80' id='gform_source_page_number_80' value='1' /> <input type='hidden' name='gform_field_values' value='' /> </div> </form> </div><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 80) {} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [80, 1]) } ); </script>