Home Forums Pre-Sales SQL Data Access?

SQL Data Access?

Posted: June 13, 2013 at 3:22 pm

Mike Johnson

June 13, 2013 at 3:22 pm

We would like to automated the process of entering event registrant information into our Sage ACT CRM system.  To do this we need to be able to access the SQL data tables.  How can we do this?



Sidney Harrell

June 13, 2013 at 3:44 pm

We define a number of constants to hold the names of the tables. Other than that, it is just a matter of declaring the wpdb global object and using it to access the tables. ie:

global $wpdb, $org_options;
	$SQL = "SELECT, ea.event_id, ea.registration_id, ea.txn_type, ed.start_date,";
	$SQL .= " ea.attendee_session, ed.event_name, ea.lname, ea.fname, ea.total_cost,";
	$SQL .= " ea.payment_status, ea.payment_date, ea.address,, ea.txn_id,";
	$SQL .= ", ea.state,, ed.event_meta FROM " . EVENTS_ATTENDEE_TABLE . " ea";
	$SQL .= " WHERE = %d";
	$temp_data = $wpdb->get_row( $wpdb->prepare( $SQL, $payment_data['attendee_id'] ), ARRAY_A );

Mike Johnson

June 24, 2013 at 2:48 pm

Hi Sideny,

Thanks for your reply.  I’m stuck in the middle between EE and my SQL tech.  He keeps asking me how he can get direct access to the SQL tables to automate the import of registrant data to ACT CRM.

I don’t understand what you wrote.  Can you please dumb it down for me?

Thanks – Mike


  • Support Staff

June 24, 2013 at 3:34 pm

Hi Mike,

This might answer your SQL tech’s question about interfacing with the database:

Event Espresso extends a normal WordPress database with its own tables, so everything in the above linked documentation that shows how to interface with the database will apply to the database tables that Event Espresso uses.

Mike Johnson

June 25, 2013 at 2:10 pm

Hi Josh – Can we arrange a 5 minute phone all?  Give me a time & I’ll get you and Chuck Hogan together.  I’m the limiting factor in this dialog.


Thanks – Mike



Mike Johnson

June 25, 2013 at 2:11 pm


Client:  Overton Safety Training




  • Support Staff

June 25, 2013 at 3:55 pm

Hi Mike,

We generally do not do phone support, and I’m pretty sure that if Chuck looks over the documentation it will answer his questions about how to interface with the database.

Another alternative way to access the event registration information from the database would be to use the new API that was developed earlier this year:

The support post ‘SQL Data Access?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso