Receiving the following MySQL error when trying to display a Node view that is selecting the nodes with > 60 terms in the argument. I've attached the view export.

Would it be possible to convert the Joins to use an IN() filter instead of all the Joins?

Too many tables; MySQL can only use 61 tables in a join query: SELECT node.nid AS nid,
   node_data_field_published_date.field_published_date_value AS node_data_field_published_date_field_published_date_value,
   node.type AS node_type,
   node.vid AS node_vid,
   node.title AS node_title,
   node.created AS node_created
 FROM node node 
 LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = 381
 LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = 382
 LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = 383
 LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = 384
 LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = 385
 LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = 386
 LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = 387
 LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = 388
 LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = 389
 LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = 304
 LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = 305
 LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = 306
 LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = 307
 LEFT JOIN term_node term_node_value_13 ON node.vid = term_node_value_13.vid AND term_node_value_13.tid = 308
 LEFT JOIN term_node term_node_value_14 ON node.vid = term_node_value_14.vid AND term_node_value_14.tid = 309
 LEFT JOIN term_node term_node_value_15 ON node.vid = term_node_value_15.vid AND term_node_value_15.tid = 310
 LEFT JOIN term_node term_node_value_16 ON node.vid = term_node_value_16.vid AND term_node_value_16.tid = 311
 LEFT JOIN term_node term_node_value_17 ON node.vid = term_node_value_17.vid AND term_node_value_17.tid = 312
 LEFT JOIN term_node term_node_value_18 ON node.vid = term_node_value_18.vid AND term_node_value_18.tid = 313
 LEFT JOIN term_node term_node_value_19 ON node.vid = term_node_value_19.vid AND term_node_value_19.tid = 314
 LEFT JOIN term_node term_node_value_20 ON node.vid = term_node_value_20.vid AND term_node_value_20.tid = 315
 LEFT JOIN term_node term_node_value_21 ON node.vid = term_node_value_21.vid AND term_node_value_21.tid = 316
 LEFT JOIN term_node term_node_value_22 ON node.vid = term_node_value_22.vid AND term_node_value_22.tid = 317
 LEFT JOIN term_node term_node_value_23 ON node.vid = term_node_value_23.vid AND term_node_value_23.tid = 318
 LEFT JOIN term_node term_node_value_24 ON node.vid = term_node_value_24.vid AND term_node_value_24.tid = 319
 LEFT JOIN term_node term_node_value_25 ON node.vid = term_node_value_25.vid AND term_node_value_25.tid = 320
 LEFT JOIN term_node term_node_value_26 ON node.vid = term_node_value_26.vid AND term_node_value_26.tid = 321
 LEFT JOIN term_node term_node_value_27 ON node.vid = term_node_value_27.vid AND term_node_value_27.tid = 322
 LEFT JOIN term_node term_node_value_28 ON node.vid = term_node_value_28.vid AND term_node_value_28.tid = 323
 LEFT JOIN term_node term_node_value_29 ON node.vid = term_node_value_29.vid AND term_node_value_29.tid = 324
 LEFT JOIN term_node term_node_value_30 ON node.vid = term_node_value_30.vid AND term_node_value_30.tid = 325
 LEFT JOIN term_node term_node_value_31 ON node.vid = term_node_value_31.vid AND term_node_value_31.tid = 326
 LEFT JOIN term_node term_node_value_32 ON node.vid = term_node_value_32.vid AND term_node_value_32.tid = 327
 LEFT JOIN term_node term_node_value_33 ON node.vid = term_node_value_33.vid AND term_node_value_33.tid = 328
 LEFT JOIN term_node term_node_value_34 ON node.vid = term_node_value_34.vid AND term_node_value_34.tid = 329
 LEFT JOIN term_node term_node_value_35 ON node.vid = term_node_value_35.vid AND term_node_value_35.tid = 330
 LEFT JOIN term_node term_node_value_36 ON node.vid = term_node_value_36.vid AND term_node_value_36.tid = 331
 LEFT JOIN term_node term_node_value_37 ON node.vid = term_node_value_37.vid AND term_node_value_37.tid = 332
 LEFT JOIN term_node term_node_value_38 ON node.vid = term_node_value_38.vid AND term_node_value_38.tid = 333
 LEFT JOIN term_node term_node_value_39 ON node.vid = term_node_value_39.vid AND term_node_value_39.tid = 334
 LEFT JOIN term_node term_node_value_40 ON node.vid = term_node_value_40.vid AND term_node_value_40.tid = 335
 LEFT JOIN term_node term_node_value_41 ON node.vid = term_node_value_41.vid AND term_node_value_41.tid = 336
 LEFT JOIN term_node term_node_value_42 ON node.vid = term_node_value_42.vid AND term_node_value_42.tid = 337
 LEFT JOIN term_node term_node_value_43 ON node.vid = term_node_value_43.vid AND term_node_value_43.tid = 338
 LEFT JOIN term_node term_node_value_44 ON node.vid = term_node_value_44.vid AND term_node_value_44.tid = 339
 LEFT JOIN term_node term_node_value_45 ON node.vid = term_node_value_45.vid AND term_node_value_45.tid = 340
 LEFT JOIN term_node term_node_value_46 ON node.vid = term_node_value_46.vid AND term_node_value_46.tid = 341
 LEFT JOIN term_node term_node_value_47 ON node.vid = term_node_value_47.vid AND term_node_value_47.tid = 342
 LEFT JOIN term_node term_node_value_48 ON node.vid = term_node_value_48.vid AND term_node_value_48.tid = 343
 LEFT JOIN term_node term_node_value_49 ON node.vid = term_node_value_49.vid AND term_node_value_49.tid = 344
 LEFT JOIN term_node term_node_value_50 ON node.vid = term_node_value_50.vid AND term_node_value_50.tid = 345
 LEFT JOIN term_node term_node_value_51 ON node.vid = term_node_value_51.vid AND term_node_value_51.tid = 346
 LEFT JOIN term_node term_node_value_52 ON node.vid = term_node_value_52.vid AND term_node_value_52.tid = 347
 LEFT JOIN term_node term_node_value_53 ON node.vid = term_node_value_53.vid AND term_node_value_53.tid = 348
 LEFT JOIN term_node term_node_value_54 ON node.vid = term_node_value_54.vid AND term_node_value_54.tid = 349
 LEFT JOIN term_node term_node_value_55 ON node.vid = term_node_value_55.vid AND term_node_value_55.tid = 350
 LEFT JOIN term_node term_node_value_56 ON node.vid = term_node_value_56.vid AND term_node_value_56.tid = 351
 LEFT JOIN term_node term_node_value_57 ON node.vid = term_node_value_57.vid AND term_node_value_57.tid = 352
 LEFT JOIN term_node term_node_value_58 ON node.vid = term_node_value_58.vid AND term_node_value_58.tid = 353
 LEFT JOIN term_node term_node_value_59 ON node.vid = term_node_value_59.vid AND term_node_value_59.tid = 354
 LEFT JOIN content_type_oig_library_item node_data_field_published_date ON node.vid = node_data_field_published_date.vid
 WHERE (node.status <> 0) AND (term_node_value_0.tid = 381 OR term_node_value_1.tid = 382 OR term_node_value_2.tid = 383 OR term_node_value_3.tid = 384 OR term_node_value_4.tid = 385 OR term_node_value_5.tid = 386 OR term_node_value_6.tid = 387 OR term_node_value_7.tid = 388 OR term_node_value_8.tid = 389 OR term_node_value_9.tid = 304 OR term_node_value_10.tid = 305 OR term_node_value_11.tid = 306 OR term_node_value_12.tid = 307 OR term_node_value_13.tid = 308 OR term_node_value_14.tid = 309 OR term_node_value_15.tid = 310 OR term_node_value_16.tid = 311 OR term_node_value_17.tid = 312 OR term_node_value_18.tid = 313 OR term_node_value_19.tid = 314 OR term_node_value_20.tid = 315 OR term_node_value_21.tid = 316 OR term_node_value_22.tid = 317 OR term_node_value_23.tid = 318 OR term_node_value_24.tid = 319 OR term_node_value_25.tid = 320 OR term_node_value_26.tid = 321 OR term_node_value_27.tid = 322 OR term_node_value_28.tid = 323 OR term_node_value_29.tid = 324 OR term_node_value_30.tid = 325 OR term_node_value_31.tid = 326 OR term_node_value_32.tid = 327 OR term_node_value_33.tid = 328 OR term_node_value_34.tid = 329 OR term_node_value_35.tid = 330 OR term_node_value_36.tid = 331 OR term_node_value_37.tid = 332 OR term_node_value_38.tid = 333 OR term_node_value_39.tid = 334 OR term_node_value_40.tid = 335 OR term_node_value_41.tid = 336 OR term_node_value_42.tid = 337 OR term_node_value_43.tid = 338 OR term_node_value_44.tid = 339 OR term_node_value_45.tid = 340 OR term_node_value_46.tid = 341 OR term_node_value_47.tid = 342 OR term_node_value_48.tid = 343 OR term_node_value_49.tid = 344 OR term_node_value_50.tid = 345 OR term_node_value_51.tid = 346 OR term_node_value_52.tid = 347 OR term_node_value_53.tid = 348 OR term_node_value_54.tid = 349 OR term_node_value_55.tid = 350 OR term_node_value_56.tid = 351 OR term_node_value_57.tid = 352 OR term_node_value_58.tid = 353 OR term_node_value_59.tid = 354)
   ORDER BY node_created DESC
  in /htdocs/sites/all/modules/views/includes/view.inc on line 775.
CommentFileSizeAuthor
views-60-terms-mysql-error.txt7.41 KBharking

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Would it be possible to convert the Joins to use an IN() filter instead of all the Joins?

Because of the way taxonomy is stored, and because you can have multiple terms attached to nodes, IN() does not work in this case.

This is not a fixable bug, unfortunately. You're going to have to find some other way to do what you're doing.

dawehner’s picture

Status: Closed (won't fix) » Closed (works as designed)

You should better not add such many arguments. This is a technical limitation of the database and i as a server would cry for help, 60 joins is huge.

So basically don't do this. If you use taxonomy menu see #416838: taxonomy/term/tid tid tid tid .... path issue

dawehner’s picture

Status: Closed (works as designed) » Closed (won't fix)

.

harking’s picture

I was able to recreate the query using an IN() statement. See below.

From looking at the taxonomy module for views, the meat of what generates the JOIN'd query is in modules/taxonomy/view_handler_relationship_node_term_data.inc on line 39 the query() function.

I could see modifying this function so that in the case where the tid is required, it would use includes/query.inc: add_where() instead of add_relationship(). The problem would be aggregating the tid's together over all the add_where's into one large IN().

SELECT DISTINCT node.nid AS nid,
   node_data_field_published_date.field_published_date_value AS node_data_field_published_date_field_published_date_value,
   node.type AS node_type,
   node.vid AS node_vid,
   node.title AS node_title,
   node.created AS node_created
FROM node node 
LEFT JOIN term_node  term_node_value_0 ON node.vid = term_node_value_0.vid
LEFT JOIN content_type_oig_library_item node_data_field_published_date ON node.vid = node_data_field_published_date.vid
WHERE (node.status <> 0 AND term_node_value_0.tid IN (382,383,384,385,386,387,388,389,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352))
   ORDER BY node_created DESC;
merlinofchaos’s picture

Your query only works if there is only one term on the node. If there are multiple terms on the node, it will cause duplication.

I appreciate what you're trying to do, but I promise you I spent *weeks* on this issue, and it's somewhere between really really difficult to solve and impossible to solve.

mchaplin’s picture

I'm not using taxonomy and I'm getting this problem. I've got a CCK type for an application form with 100 - 200 fields. I'm just trying to export the applications using a view. As soon as I hit 71 view fields, it stops working.

Too many tables; MySQL can only use 61 tables in a join query: SELECT DISTINCT(node.nid) AS nid, node.title AS node_title, node_data_field_ethnicity.field_ethnicity_value AS node_data_field_ethnicity_field_ethnicity_value, node.type AS node_type, node.vid AS node_vid, node_data_field_ethnicity.field_subject1_value AS node_data_field_ethnicity_field_subject1_value, node_data_field_course_level1.field_course_level1_value AS node_data_field_course_level1_field_course_level1_value, node_data_field_grade1.field_grade1_value AS node_data_field_grade1_field_grade1_value, node_data_field_subject2.field_subject2_value AS node_data_field_subject2_field_subject2_value, node_data_field_course_level2.field_course_level2_value AS node_data_field_course_level2_field_course_level2_value, node_data_field_grade2.field_grade2_value AS node_data_field_grade2_field_grade2_value, node_data_field_subject3.field_subject3_value AS node_data_field_subject3_field_subject3_value, node_data_field_course_level3.field_course_level3_value AS node_data_field_course_level3_field_course_level3_value, node_data_field_grade3.field_grade3_value AS node_data_field_grade3_field_grade3_value, node_data_field_subject4.field_subject4_value AS node_data_field_subject4_field_subject4_value, node_data_field_course_level4.field_course_level4_value AS node_data_field_course_level4_field_course_level4_value, node_data_field_grade4.field_grade4_value AS node_data_field_grade4_field_grade4_value, node_data_field_subject5.field_subject5_value AS node_data_field_subject5_field_subject5_value, node_data_field_course_level5.field_course_level5_value AS node_data_field_course_level5_field_course_level5_value, node_data_field_grade5.field_grade5_value AS node_data_field_grade5_field_grade5_value, node_data_field_subject6.field_subject6_value AS node_data_field_subject6_field_subject6_value, node_data_field_course_level6.field_course_level6_value AS node_data_field_course_level6_field_course_level6_value, node_data_field_grade6.field_grade6_value AS node_data_field_grade6_field_grade6_value, node_data_field_subject7.field_subject7_value AS node_data_field_subject7_field_subject7_value, node_data_field_course_level7.field_course_level7_value AS node_data_field_course_level7_field_course_level7_value, node_data_field_grade7.field_grade7_value AS node_data_field_grade7_field_grade7_value, node_data_field_subject8.field_subject8_value AS node_data_field_subject8_field_subject8_value, node_data_field_course_level8.field_course_level8_value AS node_data_field_course_level8_field_course_level8_value, node_data_field_grade8.field_grade8_value AS node_data_field_grade8_field_grade8_value, node_data_field_subject9.field_subject9_value AS node_data_field_subject9_field_subject9_value, node_data_field_course_level9.field_course_level9_value AS node_data_field_course_level9_field_course_level9_value, node_data_field_grade9.field_grade9_value AS node_data_field_grade9_field_grade9_value, node_data_field_subject10.field_subject10_value AS node_data_field_subject10_field_subject10_value, node_data_field_course_level10.field_course_level10_value AS node_data_field_course_level10_field_course_level10_value, node_data_field_grade10.field_grade10_value AS node_data_field_grade10_field_grade10_value, node_data_field_ethnicity.field_sport2_value AS node_data_field_ethnicity_field_sport2_value, node_data_field_ethnicity.field_sport1_value AS node_data_field_ethnicity_field_sport1_value, node_data_field_ethnicity.field_sportx_value AS node_data_field_ethnicity_field_sportx_value, node_data_field_ethnicity.field_sport3_value AS node_data_field_ethnicity_field_sport3_value, node_data_field_send_emails_sms.field_send_emails_sms_value AS node_data_field_send_emails_sms_field_send_emails_sms_value, node_data_field_ethnicity.field_sport6_value AS node_data_field_ethnicity_field_sport6_value, node_data_field_ethnicity.field_sport5_value AS node_data_field_ethnicity_field_sport5_value, node_data_field_special_arrangements.field_special_arrangements_value AS node_data_field_special_arrangements_field_special_arrangements_value, node_data_field_ethnicity.field_sport4_value AS node_data_field_ethnicity_field_sport4_value, node_data_field_ethnicity.field_career_interests_value AS node_data_field_ethnicity_field_career_interests_value, node_data_field_courseapp_leaflet_number.field_courseapp_leaflet_number_value AS node_data_field_courseapp_leaflet_number_field_courseapp_leaflet_number_value, node_data_field_heard_about_centre.field_heard_about_centre_value AS node_data_field_heard_about_centre_field_heard_about_centre_value, node_data_field_dob.field_dob_value AS node_data_field_dob_field_dob_value, node_data_field_forename.field_forename_value AS node_data_field_forename_field_forename_value, node_data_field_middlename.field_middlename_value AS node_data_field_middlename_field_middlename_value, node_data_field_gender.field_gender_value AS node_data_field_gender_field_gender_value, node_data_field_title.field_title_value AS node_data_field_title_field_title_value, node_data_field_ethnicity.field_mobile_value AS node_data_field_ethnicity_field_mobile_value, node_data_field_phone.field_phone_value AS node_data_field_phone_field_phone_value, node_data_field_ethnicity.field_resident_uk_value AS node_data_field_ethnicity_field_resident_uk_value, node_data_field_ethnicity.field_residency_status_value AS node_data_field_ethnicity_field_residency_status_value, node_data_field_ethnicity.field_residency_expiry_value AS node_data_field_ethnicity_field_residency_expiry_value, node_data_field_ethnicity.field_nationality_value AS node_data_field_ethnicity_field_nationality_value, node.changed AS node_changed, node_data_field_ethnicity.field_1st_choice_nid AS node_data_field_ethnicity_field_1st_choice_nid, node_data_field_postcode.field_postcode_value AS node_data_field_postcode_field_postcode_value, node_data_field_ethnicity.field_2nd_choice_nid AS node_data_field_ethnicity_field_2nd_choice_nid, node_data_field_ethnicity.field_2nd_choice_moa_value AS node_data_field_ethnicity_field_2nd_choice_moa_value, node_data_field_ethnicity.field_2nd_choice_title_value AS node_data_field_ethnicity_field_2nd_choice_title_value, node_data_field_ethnicity.field_2nd_choice_location_value AS node_data_field_ethnicity_field_2nd_choice_location_value, node_data_field_ethnicity.field_2nd_choice_leaflet_number_value AS node_data_field_ethnicity_field_2nd_choice_leaflet_number_value, node_data_field_ethnicity.field_2nd_choice_uio_id_value AS node_data_field_ethnicity_field_2nd_choice_uio_id_value, node_data_field_ethnicity.field_3rd_choice_moa_value AS node_data_field_ethnicity_field_3rd_choice_moa_value, node_data_field_ethnicity.field_3rd_choice_title_value AS node_data_field_ethnicity_field_3rd_choice_title_value, node_data_field_ethnicity.field_3rd_choice_location_value AS node_data_field_ethnicity_field_3rd_choice_location_value, node_data_field_ethnicity.field_3rd_choice_leaflet_number_value AS node_data_field_ethnicity_field_3rd_choice_leaflet_number_value, node_data_field_ethnicity.field_3rd_choice_uio_id_value AS node_data_field_ethnicity_field_3rd_choice_uio_id_value, node_data_field_1st_choice_qualtype.field_1st_choice_qualtype_value AS node_data_field_1st_choice_qualtype_field_1st_choice_qualtype_value, node_data_field_1st_choice_level.field_1st_choice_level_value AS node_data_field_1st_choice_level_field_1st_choice_level_value, node_data_field_ethnicity.field_2nd_choice_qualtype_value AS node_data_field_ethnicity_field_2nd_choice_qualtype_value, node_data_field_ethnicity.field_2nd_choice_level_value AS node_data_field_ethnicity_field_2nd_choice_level_value, node_data_field_ethnicity.field_3rd_choice_qualtype_value AS node_data_field_ethnicity_field_3rd_choice_qualtype_value, node_data_field_ethnicity.field_3rd_choice_level_value AS node_data_field_ethnicity_field_3rd_choice_level_value, node_data_field_ethnicity.field_correct_details_value AS node_data_field_ethnicity_field_correct_details_value, node_data_field_courseapp_uio_id.field_courseapp_uio_id_value AS node_data_field_courseapp_uio_id_field_courseapp_uio_id_value, node_data_field_ethnicity.field_3rdchoice_nid AS node_data_field_ethnicity_field_3rdchoice_nid, node_data_field_ethnicity.field_campus_choice_nid AS node_data_field_ethnicity_field_campus_choice_nid, node_data_field_ethnicity.field_childcare_funding_value AS node_data_field_ethnicity_field_childcare_funding_value, node_data_field_address.field_address_value AS node_data_field_address_field_address_value, node_data_field_phone_post_contact.field_phone_post_contact_value AS node_data_field_phone_post_contact_field_phone_post_contact_value, node_data_field_date10.field_date10_value AS node_data_field_date10_field_date10_value, node_data_field_date2.field_date2_value AS node_data_field_date2_field_date2_value, node_data_field_date3.field_date3_value AS node_data_field_date3_field_date3_value, node_data_field_date4.field_date4_value AS node_data_field_date4_field_date4_value, node_data_field_date5.field_date5_value AS node_data_field_date5_field_date5_value, node_data_field_date6.field_date6_value AS node_data_field_date6_field_date6_value, node_data_field_date7.field_date7_value AS node_data_field_date7_field_date7_value, node_data_field_date8.field_date8_value AS node_data_field_date8_field_date8_value, node_data_field_date9.field_date9_value AS node_data_field_date9_field_date9_value, node_data_field_date1.field_date1_value AS node_data_field_date1_field_date1_value, node_data_field_ethnicity.field_grade_type1_value AS node_data_field_ethnicity_field_grade_type1_value, node_data_field_ethnicity.field_grade_type10_value AS node_data_field_ethnicity_field_grade_type10_value, node_data_field_ethnicity.field_grade_type2_value AS node_data_field_ethnicity_field_grade_type2_value, node_data_field_ethnicity.field_grade_type3_value AS node_data_field_ethnicity_field_grade_type3_value, node_data_field_ethnicity.field_grade_type4_value AS node_data_field_ethnicity_field_grade_type4_value, node_data_field_ethnicity.field_grade_type5_value AS node_data_field_ethnicity_field_grade_type5_value, node_data_field_ethnicity.field_grade_type6_value AS node_data_field_ethnicity_field_grade_type6_value, node_data_field_ethnicity.field_grade_type7_value AS node_data_field_ethnicity_field_grade_type7_value, node_data_field_ethnicity.field_grade_type8_value AS node_data_field_ethnicity_field_grade_type8_value, node_data_field_ethnicity.field_grade_type9_value AS node_data_field_ethnicity_field_grade_type9_value, node_data_field_school1.field_school1_value AS node_data_field_school1_field_school1_value, node_data_field_school2.field_school2_value AS node_data_field_school2_field_school2_value, node_data_field_school3.field_school3_value AS node_data_field_school3_field_school3_value, node_data_field_school_date_f1.field_school_date_f1_value AS node_data_field_school_date_f1_field_school_date_f1_value, node_data_field_school_date_f2.field_school_date_f2_value AS node_data_field_school_date_f2_field_school_date_f2_value, node_data_field_school_date_f3.field_school_date_f3_value AS node_data_field_school_date_f3_field_school_date_f3_value, node_data_field_school_date_t1.field_school_date_t1_value AS node_data_field_school_date_t1_field_school_date_t1_value, node_data_field_school_date_t2.field_school_date_t2_value AS node_data_field_school_date_t2_field_school_date_t2_value, node_data_field_school_date_t3.field_school_date_t3_value AS node_data_field_school_date_t3_field_school_date_t3_value, node_data_field_ethnicity.field_referee1_value AS node_data_field_ethnicity_field_referee1_value, node_data_field_ethnicity.field_referee2_value AS node_data_field_ethnicity_field_referee2_value, node_data_field_work_date_f1.field_work_date_f1_value AS node_data_field_work_date_f1_field_work_date_f1_value, node_data_field_work_date_f2.field_work_date_f2_value AS node_data_field_work_date_f2_field_work_date_f2_value, node_data_field_work_date_f3.field_work_date_f3_value AS node_data_field_work_date_f3_field_work_date_f3_value, node_data_field_work_date_t1.field_work_date_t1_value AS node_data_field_work_date_t1_field_work_date_t1_value, node_data_field_work_date_t2.field_work_date_t2_value AS node_data_field_work_date_t2_field_work_date_t2_value, node_data_field_work_date_t3.field_work_date_t3_value AS node_data_field_work_date_t3_field_work_date_t3_value, node_data_field_employer1.field_employer1_value AS node_data_field_employer1_field_employer1_value, node_data_field_employer2.field_employer2_value AS node_data_field_employer2_field_employer2_value, node_data_field_job_duties1.field_job_duties1_value AS node_data_field_job_duties1_field_job_duties1_value, node_data_field_job_duties2.field_job_duties2_value AS node_data_field_job_duties2_field_job_duties2_value, node_data_field_job_duties3.field_job_duties3_value AS node_data_field_job_duties3_field_job_duties3_value, node_data_field_employer3.field_employer3_value AS node_data_field_employer3_field_employer3_value, node_data_field_fulltime1.field_fulltime1_value AS node_data_field_fulltime1_field_fulltime1_value, node_data_field_fulltime2.field_fulltime2_value AS node_data_field_fulltime2_field_fulltime2_value, node_data_field_fulltime3.field_fulltime3_value AS node_data_field_fulltime3_field_fulltime3_value, node_data_field_paid1.field_paid1_value AS node_data_field_paid1_field_paid1_value, node_data_field_paid2.field_paid2_value AS node_data_field_paid2_field_paid2_value, node_data_field_paid3.field_paid3_value AS node_data_field_paid3_field_paid3_value, node_data_field_ethnicity.field_ni_number_value AS node_data_field_ethnicity_field_ni_number_value, node_data_field_ethnicity.field_1st_choice_freetext_value AS node_data_field_ethnicity_field_1st_choice_freetext_value, node_data_field_1st_choice_moa.field_1st_choice_moa_value AS node_data_field_1st_choice_moa_field_1st_choice_moa_value, node_data_field_1st_choice_title.field_1st_choice_title_value AS node_data_field_1st_choice_title_field_1st_choice_title_value, node_data_field_choice1_location.field_choice1_location_value AS node_data_field_choice1_location_field_choice1_location_value, node_data_field_ethnicity.field_2nd_choice_freetext_value AS node_data_field_ethnicity_field_2nd_choice_freetext_value, node_data_field_ethnicity.field_3rd_choice_freetext_value AS node_data_field_ethnicity_field_3rd_choice_freetext_value, node_data_field_ethnicity.field_interviewag_value AS node_data_field_ethnicity_field_interviewag_value, node_data_field_ethnicity.field_learnernumber_value AS node_data_field_ethnicity_field_learnernumber_value, users.mail AS users_mail, users.uid AS users_uid, node_data_field_ethnicity.field_no_quals_value AS node_data_field_ethnicity_field_no_quals_value, node_data_field_info_privacy.field_info_privacy_value AS node_data_field_info_privacy_field_info_privacy_value, 'allcourseapps:default' AS view_name FROM node node LEFT JOIN content_field_exported node_data_field_exported ON node.vid = node_data_field_exported.vid LEFT JOIN content_field_submitted node_data_field_submitted ON node.vid = node_data_field_submitted.vid LEFT JOIN content_type_courseapp node_data_field_ethnicity ON node.vid = node_data_field_ethnicity.vid LEFT JOIN content_field_course_level1 node_data_field_course_level1 ON node.vid = node_data_field_course_level1.vid LEFT JOIN content_field_grade1 node_data_field_grade1 ON node.vid = node_data_field_grade1.vid LEFT JOIN content_field_subject2 node_data_field_subject2 ON node.vid = node_data_field_subject2.vid LEFT JOIN content_field_course_level2 node_data_field_course_level2 ON node.vid = node_data_field_course_level2.vid LEFT JOIN content_field_grade2 node_data_field_grade2 ON node.vid = node_data_field_grade2.vid LEFT JOIN content_field_subject3 node_data_field_subject3 ON node.vid = node_data_field_subject3.vid LEFT JOIN content_field_course_level3 node_data_field_course_level3 ON node.vid = node_data_field_course_level3.vid LEFT JOIN content_field_grade3 node_data_field_grade3 ON node.vid = node_data_field_grade3.vid LEFT JOIN content_field_subject4 node_data_field_subject4 ON node.vid = node_data_field_subject4.vid LEFT JOIN content_field_course_level4 node_data_field_course_level4 ON node.vid = node_data_field_course_level4.vid LEFT JOIN content_field_grade4 node_data_field_grade4 ON node.vid = node_data_field_grade4.vid LEFT JOIN content_field_subject5 node_data_field_subject5 ON node.vid = node_data_field_subject5.vid LEFT JOIN content_field_course_level5 node_data_field_course_level5 ON node.vid = node_data_field_course_level5.vid LEFT JOIN content_field_grade5 node_data_field_grade5 ON node.vid = node_data_field_grade5.vid LEFT JOIN content_field_subject6 node_data_field_subject6 ON node.vid = node_data_field_subject6.vid LEFT JOIN content_field_course_level6 node_data_field_course_level6 ON node.vid = node_data_field_course_level6.vid LEFT JOIN content_field_grade6 node_data_field_grade6 ON node.vid = node_data_field_grade6.vid LEFT JOIN content_field_subject7 node_data_field_subject7 ON node.vid = node_data_field_subject7.vid LEFT JOIN content_field_course_level7 node_data_field_course_level7 ON node.vid = node_data_field_course_level7.vid LEFT JOIN content_field_grade7 node_data_field_grade7 ON node.vid = node_data_field_grade7.vid LEFT JOIN content_field_subject8 node_data_field_subject8 ON node.vid = node_data_field_subject8.vid LEFT JOIN content_field_course_level8 node_data_field_course_level8 ON node.vid = node_data_field_course_level8.vid LEFT JOIN content_field_grade8 node_data_field_grade8 ON node.vid = node_data_field_grade8.vid LEFT JOIN content_field_subject9 node_data_field_subject9 ON node.vid = node_data_field_subject9.vid LEFT JOIN content_field_course_level9 node_data_field_course_level9 ON node.vid = node_data_field_course_level9.vid LEFT JOIN content_field_grade9 node_data_field_grade9 ON node.vid = node_data_field_grade9.vid LEFT JOIN content_field_subject10 node_data_field_subject10 ON node.vid = node_data_field_subject10.vid LEFT JOIN content_field_course_level10 node_data_field_course_level10 ON node.vid = node_data_field_course_level10.vid LEFT JOIN content_field_grade10 node_data_field_grade10 ON node.vid = node_data_field_grade10.vid LEFT JOIN content_field_send_emails_sms node_data_field_send_emails_sms ON node.vid = node_data_field_send_emails_sms.vid LEFT JOIN content_field_special_arrangements node_data_field_special_arrangements ON node.vid = node_data_field_special_arrangements.vid LEFT JOIN content_field_courseapp_leaflet_number node_data_field_courseapp_leaflet_number ON node.vid = node_data_field_courseapp_leaflet_number.vid LEFT JOIN content_field_heard_about_centre node_data_field_heard_about_centre ON node.vid = node_data_field_heard_about_centre.vid LEFT JOIN content_field_dob node_data_field_dob ON node.vid = node_data_field_dob.vid LEFT JOIN content_field_forename node_data_field_forename ON node.vid = node_data_field_forename.vid LEFT JOIN content_field_middlename node_data_field_middlename ON node.vid = node_data_field_middlename.vid LEFT JOIN content_field_gender node_data_field_gender ON node.vid = node_data_field_gender.vid LEFT JOIN content_field_title node_data_field_title ON node.vid = node_data_field_title.vid LEFT JOIN content_field_phone node_data_field_phone ON node.vid = node_data_field_phone.vid LEFT JOIN content_field_postcode node_data_field_postcode ON node.vid = node_data_field_postcode.vid LEFT JOIN content_field_1st_choice_qualtype node_data_field_1st_choice_qualtype ON node.vid = node_data_field_1st_choice_qualtype.vid LEFT JOIN content_field_1st_choice_level node_data_field_1st_choice_level ON node.vid = node_data_field_1st_choice_level.vid LEFT JOIN content_field_courseapp_uio_id node_data_field_courseapp_uio_id ON node.vid = node_data_field_courseapp_uio_id.vid LEFT JOIN content_field_address node_data_field_address ON node.vid = node_data_field_address.vid LEFT JOIN content_field_phone_post_contact node_data_field_phone_post_contact ON node.vid = node_data_field_phone_post_contact.vid LEFT JOIN content_field_date10 node_data_field_date10 ON node.vid = node_data_field_date10.vid LEFT JOIN content_field_date2 node_data_field_date2 ON node.vid = node_data_field_date2.vid LEFT JOIN content_field_date3 node_data_field_date3 ON node.vid = node_data_field_date3.vid LEFT JOIN content_field_date4 node_data_field_date4 ON node.vid = node_data_field_date4.vid LEFT JOIN content_field_date5 node_data_field_date5 ON node.vid = node_data_field_date5.vid LEFT JOIN content_field_date6 node_data_field_date6 ON node.vid = node_data_field_date6.vid LEFT JOIN content_field_date7 node_data_field_date7 ON node.vid = node_data_field_date7.vid LEFT JOIN content_field_date8 node_data_field_date8 ON node.vid = node_data_field_date8.vid LEFT JOIN content_field_date9 node_data_field_date9 ON node.vid = node_data_field_date9.vid LEFT JOIN content_field_date1 node_data_field_date1 ON node.vid = node_data_field_date1.vid LEFT JOIN content_field_school1 node_data_field_school1 ON node.vid = node_data_field_school1.vid LEFT JOIN content_field_school2 node_data_field_school2 ON node.vid = node_data_field_school2.vid LEFT JOIN content_field_school3 node_data_field_school3 ON node.vid = node_data_field_school3.vid LEFT JOIN content_field_school_date_f1 node_data_field_school_date_f1 ON node.vid = node_data_field_school_date_f1.vid LEFT JOIN content_field_school_date_f2 node_data_field_school_date_f2 ON node.vid = node_data_field_school_date_f2.vid LEFT JOIN content_field_school_date_f3 node_data_field_school_date_f3 ON node.vid = node_data_field_school_date_f3.vid LEFT JOIN content_field_school_date_t1 node_data_field_school_date_t1 ON node.vid = node_data_field_school_date_t1.vid LEFT JOIN content_field_school_date_t2 node_data_field_school_date_t2 ON node.vid = node_data_field_school_date_t2.vid LEFT JOIN content_field_school_date_t3 node_data_field_school_date_t3 ON node.vid = node_data_field_school_date_t3.vid LEFT JOIN content_field_work_date_f1 node_data_field_work_date_f1 ON node.vid = node_data_field_work_date_f1.vid LEFT JOIN content_field_work_date_f2 node_data_field_work_date_f2 ON node.vid = node_data_field_work_date_f2.vid LEFT JOIN content_field_work_date_f3 node_data_field_work_date_f3 ON node.vid = node_data_field_work_date_f3.vid LEFT JOIN content_field_work_date_t1 node_data_field_work_date_t1 ON node.vid = node_data_field_work_date_t1.vid LEFT JOIN content_field_work_date_t2 node_data_field_work_date_t2 ON node.vid = node_data_field_work_date_t2.vid LEFT JOIN content_field_work_date_t3 node_data_field_work_date_t3 ON node.vid = node_data_field_work_date_t3.vid LEFT JOIN content_field_employer1 node_data_field_employer1 ON node.vid = node_data_field_employer1.vid LEFT JOIN content_field_employer2 node_data_field_employer2 ON node.vid = node_data_field_employer2.vid LEFT JOIN content_field_job_duties1 node_data_field_job_duties1 ON node.vid = node_data_field_job_duties1.vid LEFT JOIN content_field_job_duties2 node_data_field_job_duties2 ON node.vid = node_data_field_job_duties2.vid LEFT JOIN content_field_job_duties3 node_data_field_job_duties3 ON node.vid = node_data_field_job_duties3.vid LEFT JOIN content_field_employer3 node_data_field_employer3 ON node.vid = node_data_field_employer3.vid LEFT JOIN content_field_fulltime1 node_data_field_fulltime1 ON node.vid = node_data_field_fulltime1.vid LEFT JOIN content_field_fulltime2 node_data_field_fulltime2 ON node.vid = node_data_field_fulltime2.vid LEFT JOIN content_field_fulltime3 node_data_field_fulltime3 ON node.vid = node_data_field_fulltime3.vid LEFT JOIN content_field_paid1 node_data_field_paid1 ON node.vid = node_data_field_paid1.vid LEFT JOIN content_field_paid2 node_data_field_paid2 ON node.vid = node_data_field_paid2.vid LEFT JOIN content_field_paid3 node_data_field_paid3 ON node.vid = node_data_field_paid3.vid LEFT JOIN content_field_1st_choice_moa node_data_field_1st_choice_moa ON node.vid = node_data_field_1st_choice_moa.vid LEFT JOIN content_field_1st_choice_title node_data_field_1st_choice_title ON node.vid = node_data_field_1st_choice_title.vid LEFT JOIN content_field_choice1_location node_data_field_choice1_location ON node.vid = node_data_field_choice1_location.vid INNER JOIN users users ON node.uid = users.uid LEFT JOIN content_field_info_privacy node_data_field_info_privacy ON node.vid = node_data_field_info_privacy.vid WHERE (node.type in ('courseapp')) AND (UPPER(node_data_field_exported.field_exported_value) = UPPER('off')) AND ((node_data_field_submitted.field_submitted_value) = ('on')) GROUP BY nid ORDER BY node_changed ASC LIMIT 0, 5 in /home/default/themanchestercollege.ac.uk/user/htdocs/sites/all/modules/views/includes/view.inc on line 771.