Posted: October 1, 2012 at 11:25 am
|
I need to create a new database table that has the wp_events_attendee info in it, but only for a specific event ID#, and only for folks that have a payment_status of “Completed.” Can you tell me how to do this? My goal is to reference this table for a Moodle User Authentication & Class Enrollment purpose. Or, is there a way to create an auto-updating table in phpmyadmin that mirrors the wp_events_attendee table, but with the filters as described above? |
|
AFTER FURTHER CONSIDERATION, HERE’S WHAT WOULD BE IDEAL: I need to program EE to export filtered attendee data (attendee info for a specific CATEGORY of class that have a payment_status of CONFIRMED) into a new table (I’d like to call it moodle_users). Then, EE would create a different table for each of the “online” classes, that had ONLY the attendees that have a payment_status of CONFIRMED. These would need to be separated out by event_id, so that they could be independently linked to a specific class in Moodle. I have no idea how to make this happen. But, if you can tell me what to do, I can implement it. |
Hi there, If it’s something that can be accomplished by adding a few code snippets we can typically help, but this sort of request is well beyond the scope of support and into the realm of custom plugin development. I can recommend posting a job on our job board for this type of customization: or you could also contract with one of the Pros listed at WPCandy.com who have experience with custom plugin development and Event Espresso: |
|
|
I see that you guys have “sponsored” jobs. Can you give me an idea of how many hours it would take for someone to do this? |
|
It seems like you’d be better off just doing the query on the attendees table using a where (event_id = x or event_id = y) and (payment_status=”Completed”) whenever you need to check it for login. Otherwise, you’re going to have to do a lot to keep the new table in sync, and you’ll still need to query the new table. |
We really don’t have enough information that tells us what format you need for the data or how exactly you see this working. But I can tell you that you don’t need to have additional tables for all of the different categories. You should just be able to write a function that queries the Simple SQL statement (query) to retrieve the attendees that have paid:
|
|
|
Thanks Seth. That was very helpful. I was able to create a “view” in phpMyAdmin using this code, which allowed me to create another table. Can you tell me how to add to this code so that I can also sort based on the category_id of the course? I know I need to reference the wp_events_category_rel table. But, that’s where my understanding ends. Thanks! |
|
So, I’ve figured out how to do this query, also referencing the other table. In case others may be interested, here’s the code: |
|
Solved by sticking this on the tail-end of the code above! |
The support post ‘Adding a new database table’ 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.