Guest User

Untitled

a guest
Sep 22nd, 2010
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 7.87 KB | None | 0 0
  1. SELECT DISTINCT(node.nid) AS nid, node.title AS node_title, node.type AS node_type, node.vid AS node_vid, node.sticky AS
  2.      node_sticky
  3.   FROM node node INNER JOIN content_field_accommodation node_data_field_accommodation ON node.vid =
  4.      node_data_field_accommodation.vid INNER JOIN content_field_corporate_capacity node_data_field_corporate_capacity ON
  5.      node.vid = node_data_field_corporate_capacity.vid INNER JOIN content_field_cottage_capacity
  6.      node_data_field_cottage_capacity ON node.vid = node_data_field_cottage_capacity.vid INNER JOIN content_field_transit_time
  7.      node_data_field_transit_time ON node.vid = node_data_field_transit_time.vid INNER JOIN content_field_child_infrastructure
  8.      node_data_field_child_infrastructure_value_0 ON node.vid = node_data_field_child_infrastructure_value_0.vid AND
  9.      node_data_field_child_infrastructure_value_0.field_child_infrastructure_value = 1 INNER JOIN
  10.      content_field_child_infrastructure node_data_field_child_infrastructure_value_1 ON node.vid =
  11.      node_data_field_child_infrastructure_value_1.vid AND
  12.      node_data_field_child_infrastructure_value_1.field_child_infrastructure_value = 2 INNER JOIN
  13.      content_field_child_infrastructure node_data_field_child_infrastructure_value_2 ON node.vid =
  14.      node_data_field_child_infrastructure_value_2.vid AND
  15.      node_data_field_child_infrastructure_value_2.field_child_infrastructure_value = 3 INNER JOIN
  16.      content_field_child_infrastructure node_data_field_child_infrastructure_value_3 ON node.vid =
  17.      node_data_field_child_infrastructure_value_3.vid AND
  18.      node_data_field_child_infrastructure_value_3.field_child_infrastructure_value = 4 INNER JOIN
  19.      content_field_child_infrastructure node_data_field_child_infrastructure_value_4 ON node.vid =
  20.      node_data_field_child_infrastructure_value_4.vid AND
  21.      node_data_field_child_infrastructure_value_4.field_child_infrastructure_value = 5 INNER JOIN
  22.      content_field_child_infrastructure node_data_field_child_infrastructure_value_5 ON node.vid =
  23.      node_data_field_child_infrastructure_value_5.vid AND
  24.      node_data_field_child_infrastructure_value_5.field_child_infrastructure_value = 6 INNER JOIN
  25.      content_field_child_infrastructure node_data_field_child_infrastructure_value_6 ON node.vid =
  26.      node_data_field_child_infrastructure_value_6.vid AND
  27.      node_data_field_child_infrastructure_value_6.field_child_infrastructure_value = 7 INNER JOIN
  28.      content_field_cottage_infrastructure node_data_field_cottage_infrastructure_value_0 ON node.vid =
  29.      node_data_field_cottage_infrastructure_value_0.vid AND
  30.      node_data_field_cottage_infrastructure_value_0.field_cottage_infrastructure_value = 1 INNER JOIN
  31.      content_field_room_infrastructure node_data_field_room_infrastructure_value_0 ON node.vid =
  32.      node_data_field_room_infrastructure_value_0.vid AND
  33.      node_data_field_room_infrastructure_value_0.field_room_infrastructure_value = 1 INNER JOIN
  34.      content_field_room_infrastructure node_data_field_room_infrastructure_value_1 ON node.vid =
  35.      node_data_field_room_infrastructure_value_1.vid AND
  36.      node_data_field_room_infrastructure_value_1.field_room_infrastructure_value = 2 INNER JOIN
  37.      content_field_room_infrastructure node_data_field_room_infrastructure_value_2 ON node.vid =
  38.      node_data_field_room_infrastructure_value_2.vid AND
  39.      node_data_field_room_infrastructure_value_2.field_room_infrastructure_value = 3 INNER JOIN
  40.      content_field_room_infrastructure node_data_field_room_infrastructure_value_3 ON node.vid =
  41.      node_data_field_room_infrastructure_value_3.vid AND
  42. node_data_field_room_infrastructure_value_3.field_room_infrastructure_value = 7 INNER JOIN content_field_openair
  43.      node_data_field_openair ON node.vid = node_data_field_openair.vid INNER JOIN content_field_orientation
  44.      node_data_field_orientation ON node.vid = node_data_field_orientation.vid INNER JOIN content_field_meals
  45.      node_data_field_meals ON node.vid = node_data_field_meals.vid INNER JOIN content_field_animals node_data_field_animals ON
  46.      node.vid = node_data_field_animals.vid INNER JOIN content_field_corporate_one_day node_data_field_corporate_one_day ON
  47.      node.vid = node_data_field_corporate_one_day.vid INNER JOIN content_field_rent node_data_field_rent ON node.vid =
  48.      node_data_field_rent.vid INNER JOIN content_field_relax node_data_field_relax ON node.vid = node_data_field_relax.vid
  49.      INNER JOIN content_field_area node_data_field_area ON node.vid = node_data_field_area.vid INNER JOIN content_field_sports
  50.      node_data_field_sports ON node.vid = node_data_field_sports.vid INNER JOIN content_field_audience
  51.      node_data_field_audience_value_0 ON node.vid = node_data_field_audience_value_0.vid AND
  52.      node_data_field_audience_value_0.field_audience_value = 1 INNER JOIN content_field_audience
  53.      node_data_field_audience_value_1 ON node.vid = node_data_field_audience_value_1.vid AND
  54.      node_data_field_audience_value_1.field_audience_value = 2 INNER JOIN content_field_audience
  55.      node_data_field_audience_value_2 ON node.vid = node_data_field_audience_value_2.vid AND
  56.      node_data_field_audience_value_2.field_audience_value = 3 INNER JOIN content_field_excursions node_data_field_excursions
  57.      ON node.vid = node_data_field_excursions.vid INNER JOIN content_field_grade node_data_field_grade ON node.vid =
  58.      node_data_field_grade.vid INNER JOIN content_field_internet node_data_field_internet ON node.vid =
  59.      node_data_field_internet.vid
  60.   WHERE (node.status <> 0) AND (node.type in ('object')) AND (node_data_field_accommodation.field_accommodation_value IN (1,
  61.      2)) AND (node_data_field_corporate_capacity.field_corporate_capacity_value = 1) AND
  62.      (node_data_field_cottage_capacity.field_cottage_capacity_value = 1) AND
  63.      (node_data_field_transit_time.field_transit_time_value = 2) AND
  64.      (node_data_field_child_infrastructure_value_0.field_child_infrastructure_value = 1 AND
  65.      node_data_field_child_infrastructure_value_1.field_child_infrastructure_value = 2 AND
  66.      node_data_field_child_infrastructure_value_2.field_child_infrastructure_value = 3 AND
  67.      node_data_field_child_infrastructure_value_3.field_child_infrastructure_value = 4 AND
  68.      node_data_field_child_infrastructure_value_4.field_child_infrastructure_value = 5 AND
  69.      node_data_field_child_infrastructure_value_5.field_child_infrastructure_value = 6 AND
  70.      node_data_field_child_infrastructure_value_6.field_child_infrastructure_value = 7) AND
  71.      (node_data_field_cottage_infrastructure_value_0.field_cottage_infrastructure_value = 1) AND
  72.      (node_data_field_room_infrastructure_value_0.field_room_infrastructure_value = 1 AND
  73.      node_data_field_room_infrastructure_value_1.field_room_infrastructure_value = 2 AND
  74.      node_data_field_room_infrastructure_value_2.field_room_infrastructure_value = 3 AND
  75.      node_data_field_room_infrastructure_value_3.field_room_infrastructure_value = 7) AND
  76.      (node_data_field_openair.field_openair_value = 1) AND (node_data_field_orientation.field_orientation_value IN (1, 2, 3,
  77.      5, 8, 9)) AND (node_data_field_meals.field_meals_value = 3) AND (node_data_field_animals.field_animals_value = 1) AND
  78.      (node_data_field_corporate_one_day.field_corporate_one_day_value = 1) AND (node_data_field_rent.field_rent_value IN (1,
  79.      3, 4, 6)) AND (node_data_field_relax.field_relax_value IN (1, 2, 3)) AND (node_data_field_area.field_area_value = 1) AND
  80.      (node_data_field_sports.field_sports_value IN (5, 6, 9)) AND (node_data_field_audience_value_0.field_audience_value = 1
  81.      AND node_data_field_audience_value_1.field_audience_value = 2 AND node_data_field_audience_value_2.field_audience_value =
  82.      3) AND (node_data_field_excursions.field_excursions_value = 1) AND (node_data_field_grade.field_grade_value = 2) AND
  83.      (node_data_field_internet.field_internet_value = 1)
  84.   ORDER BY node_sticky DESC, node_title ASC
  85.   LIMIT 0, 8
Advertisement
Add Comment
Please, Sign In to add comment