Title: Issue regarding sql tables
Last modified: October 28, 2018

---

# Issue regarding sql tables

 *  Resolved [weekendize](https://wordpress.org/support/users/weekendize/)
 * (@weekendize)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/issue-regarding-sql-tables/)
 * Hey,
 * I want to create some SQL-queries to fetch some specific data from the booking
   activities of the users.
    I don’t know to which table the foreign key ‘object_id’
   of the table ‘wp_bookacti_permissions’ is relating to.
 * Thanks in advance.
 * Best,
    weekendize

Viewing 1 replies (of 1 total)

 *  Plugin Author [Booking Activities Team](https://wordpress.org/support/users/bookingactivities/)
 * (@bookingactivities)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/issue-regarding-sql-tables/#post-10825904)
 * Hello,
 * First, thank you very much for your review!
 * The “object_id” refer to the “id” column of the table specified in the “object_type”.
 * For example,
    – if the “object_type” is “template”, the “object_id” refer to 
   the “id” of the “wp_bookacti_templates” table – if the “object_type” is “activity”,
   the “object_id” refer to the “id” of the “wp_bookacti_activities” table
 * You just need to know the associations:
    object_type => table “template” => “
   wp_bookacti_templates” “activity” => “wp_bookacti_activities” “form” => “wp_bookacti_forms”
 * The “wp_bookacti_meta” table works the same way, but there are a bit more associations:
   
   object_type => table “event” => “wp_bookacti_events” “group_of_events” => “wp_bookacti_event_groups”“
   group_category” => “wp_bookacti_group_categories” “form_field” => “wp_bookacti_form_fields”“
   booking” => “wp_bookacti_bookings” “booking_group” => “wp_bookacti_booking_groups”
 * Regards,
    Yoan Cutillas

Viewing 1 replies (of 1 total)

The topic ‘Issue regarding sql tables’ is closed to new replies.

 * ![](https://ps.w.org/booking-activities/assets/icon-256x256.png?rev=1709970)
 * [Booking Activities](https://wordpress.org/plugins/booking-activities/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/booking-activities/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/booking-activities/)
 * [Active Topics](https://wordpress.org/support/plugin/booking-activities/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/booking-activities/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/booking-activities/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Booking Activities Team](https://wordpress.org/support/users/bookingactivities/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/issue-regarding-sql-tables/#post-10825904)
 * Status: resolved