prefix}g_extra_calendar ec ON ec.extra_id = e.id WHERE ec.calendar_id = {$calendar->id} "); } static public function getForBooking(DateTimeBook $booking) { global $wpdb; return self::queryToList(" SELECT e.id, e.name, e.price, e.sum_op FROM ".self::get_table_static()." e INNER JOIN {$wpdb->prefix}g_extras_booking eb ON eb.extra_id = e.id WHERE eb.booking_id = {$booking->id} "); } }