|
I manually added one participant, selected all attributes, then tried to export to CSV. This is the result:
CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1116 Too many tables; MySQL can only use 61 tables in a join. The SQL statement executed was: SELECT p ., luser .full_name AS ownername , luser .users_name AS username , (SELECT count() survey
FROM lime_survey_links sl
WHERE sl.participant_id = p.participant_id) survey, attribute0 .value AS a0 , attribute1 .value AS a1 , attribute2 .value AS a2 , attribute3 .value AS a3 , attribute4 .value AS a4 , attribute5 .value AS a5 , attribute6 .value AS a6 , attribute7 .value AS a7 , attribute8 .value AS a8 , attribute9 .value AS a9 , attribute10 .value AS a10 , attribute11 .value AS a11 , attribute12 .value AS a12 , attribute13 .value AS a13 , attribute14 .value AS a14 , attribute15 .value AS a15 , attribute16 .value AS a16 , attribute17 .value AS a17 , attribute18 .value AS a18 , attribute19 .value AS a19 , attribute20 .value AS a20 , attribute21 .value AS a21 , attribute22 .value AS a22 , attribute23 .value AS a23 , attribute24 .value AS a24 , attribute25 .value AS a25 , attribute26 .value AS a26 , attribute27 .value AS a27 , attribute28 .value AS a28 , attribute29 .value AS a29 , attribute30 .value AS a30 , attribute31 .value AS a31 , attribute32 .value AS a32 , attribute33 .value AS a33 , attribute34 .value AS a34 , attribute35 .value AS a35 , attribute36 .value AS a36 , attribute37 .value AS a37 , attribute38 .value AS a38 , attribute39 .value AS a39 , attribute40 .value AS a40 , attribute41 .value AS a41 , attribute42 .value AS a42 , attribute43 .value AS a43 , attribute44 .value AS a44 , attribute45 .value AS a45 , attribute46 .value AS a46 , attribute47 .value AS a47 , attribute48 .value AS a48 , attribute49 .value AS a49 , attribute50 .value AS a50 , attribute51 .value AS a51 , attribute52 .value AS a52 , attribute53 .value AS a53 , attribute54 .value AS a54 , attribute55 .value AS a55 , attribute56 .value AS a56 , attribute57 .value AS a57 , attribute58 .value AS a58 , attribute59 .value AS a59 , attribute60 .value AS a60 , attribute61 .value AS a61 , attribute62 .value AS a62 , attribute63 .value AS a63 , attribute64 .value AS a64 , attribute65 .value AS a65 , attribute66 .value AS a66 , attribute67 .value AS a67 , attribute68 .value AS a68 , attribute69 .value AS a69 , attribute70 .value AS a70 , attribute71 .value AS a71 , attribute72 .value AS a72 , attribute73 .value AS a73 , attribute74 .value AS a74 , attribute75 .value AS a75 , attribute76 .value AS a76 , attribute77 .value AS a77 , attribute78 .value AS a78 , attribute79 .value AS a79 , attribute80 .value AS a80 , attribute81 .value AS a81 , attribute82 .value AS a82 , attribute83 .value AS a83 , attribute84 .value AS a84 , attribute85 .value AS a85 , attribute86 .value AS a86 , attribute87 .value AS a87 , attribute88 .value AS a88 , attribute89 .value AS a89 , attribute90 .value AS a90 , attribute91 .value AS a91 , attribute92 .value AS a92 , attribute93 .value AS a93 , attribute94 .value AS a94 , attribute95 .value AS a95 , attribute96 .value AS a96 , attribute97 .value AS a97 , attribute98 .value AS a98 , attribute99 .value AS a99 , attribute100 .value AS a100 , attribute101 .value AS a101 , attribute102 .value AS a102 , attribute103 .value AS a103 , attribute104 .value AS a104 , attribute105 .value AS a105 , attribute106 .value AS a106 , attribute107 .value AS a107 , attribute108 .value AS a108 , attribute109 .value AS a109 , attribute110 .value AS a110 , attribute111 .value AS a111 , attribute112 .value AS a112 , attribute113 .value AS a113
FROM lime_participants p
left join lime_users luser ON luser.uid=p.owner_uid
LEFT JOIN lime_participant_attribute attribute0 ON attribute0.participant_id=p.participant_id AND attribute0.attribute_id=0
LEFT JOIN lime_participant_attribute attribute1 ON attribute1.participant_id=p.participant_id AND attribute1.attribute_id=1
LEFT JOIN lime_participant_attribute attribute2 ON attribute2.participant_id=p.participant_id AND attribute2.attribute_id=2
LEFT JOIN lime_participant_attribute attribute3 ON attribute3.participant_id=p.participant_id AND attribute3.attribute_id=3
LEFT JOIN lime_participant_attribute attribute4 ON attribute4.participant_id=p.participant_id AND attribute4.attribute_id=4
LEFT JOIN lime_participant_attribute attribute5 ON attribute5.participant_id=p.participant_id AND attribute5.attribute_id=5
LEFT JOIN lime_participant_attribute attribute6 ON attribute6.participant_id=p.participant_id AND attribute6.attribute_id=6
LEFT JOIN lime_participant_attribute attribute7 ON attribute7.participant_id=p.participant_id AND attribute7.attribute_id=7
LEFT JOIN lime_participant_attribute attribute8 ON attribute8.participant_id=p.participant_id AND attribute8.attribute_id=8
LEFT JOIN lime_participant_attribute attribute9 ON attribute9.participant_id=p.participant_id AND attribute9.attribute_id=9
LEFT JOIN lime_participant_attribute attribute10 ON attribute10.participant_id=p.participant_id AND attribute10.attribute_id=10
LEFT JOIN lime_participant_attribute attribute11 ON attribute11.participant_id=p.participant_id AND attribute11.attribute_id=11
LEFT JOIN lime_participant_attribute attribute12 ON attribute12.participant_id=p.participant_id AND attribute12.attribute_id=12
LEFT JOIN lime_participant_attribute attribute13 ON attribute13.participant_id=p.participant_id AND attribute13.attribute_id=13
LEFT JOIN lime_participant_attribute attribute14 ON attribute14.participant_id=p.participant_id AND attribute14.attribute_id=14
LEFT JOIN lime_participant_attribute attribute15 ON attribute15.participant_id=p.participant_id AND attribute15.attribute_id=15
LEFT JOIN lime_participant_attribute attribute16 ON attribute16.participant_id=p.participant_id AND attribute16.attribute_id=16
LEFT JOIN lime_participant_attribute attribute17 ON attribute17.participant_id=p.participant_id AND attribute17.attribute_id=17
LEFT JOIN lime_participant_attribute attribute18 ON attribute18.participant_id=p.participant_id AND attribute18.attribute_id=18
LEFT JOIN lime_participant_attribute attribute19 ON attribute19.participant_id=p.participant_id AND attribute19.attribute_id=19
LEFT JOIN lime_participant_attribute attribute20 ON attribute20.participant_id=p.participant_id AND attribute20.attribute_id=20
LEFT JOIN lime_participant_attribute attribute21 ON attribute21.participant_id=p.participant_id AND attribute21.attribute_id=21
LEFT JOIN lime_participant_attribute attribute22 ON attribute22.participant_id=p.participant_id AND attribute22.attribute_id=22
LEFT JOIN lime_participant_attribute attribute23 ON attribute23.participant_id=p.participant_id AND attribute23.attribute_id=23
LEFT JOIN lime_participant_attribute attribute24 ON attribute24.participant_id=p.participant_id AND attribute24.attribute_id=24
LEFT JOIN lime_participant_attribute attribute25 ON attribute25.participant_id=p.participant_id AND attribute25.attribute_id=25
LEFT JOIN lime_participant_attribute attribute26 ON attribute26.participant_id=p.participant_id AND attribute26.attribute_id=26
LEFT JOIN lime_participant_attribute attribute27 ON attribute27.participant_id=p.participant_id AND attribute27.attribute_id=27
LEFT JOIN lime_participant_attribute attribute28 ON attribute28.participant_id=p.participant_id AND attribute28.attribute_id=28
LEFT JOIN lime_participant_attribute attribute29 ON attribute29.participant_id=p.participant_id AND attribute29.attribute_id=29
LEFT JOIN lime_participant_attribute attribute30 ON attribute30.participant_id=p.participant_id AND attribute30.attribute_id=30
LEFT JOIN lime_participant_attribute attribute31 ON attribute31.participant_id=p.participant_id AND attribute31.attribute_id=31
LEFT JOIN lime_participant_attribute attribute32 ON attribute32.participant_id=p.participant_id AND attribute32.attribute_id=32
LEFT JOIN lime_participant_attribute attribute33 ON attribute33.participant_id=p.participant_id AND attribute33.attribute_id=33
LEFT JOIN lime_participant_attribute attribute34 ON attribute34.participant_id=p.participant_id AND attribute34.attribute_id=34
LEFT JOIN lime_participant_attribute attribute35 ON attribute35.participant_id=p.participant_id AND attribute35.attribute_id=35
LEFT JOIN lime_participant_attribute attribute36 ON attribute36.participant_id=p.participant_id AND attribute36.attribute_id=36
LEFT JOIN lime_participant_attribute attribute37 ON attribute37.participant_id=p.participant_id AND attribute37.attribute_id=37
LEFT JOIN lime_participant_attribute attribute38 ON attribute38.participant_id=p.participant_id AND attribute38.attribute_id=38
LEFT JOIN lime_participant_attribute attribute39 ON attribute39.participant_id=p.participant_id AND attribute39.attribute_id=39
LEFT JOIN lime_participant_attribute attribute40 ON attribute40.participant_id=p.participant_id AND attribute40.attribute_id=40
LEFT JOIN lime_participant_attribute attribute41 ON attribute41.participant_id=p.participant_id AND attribute41.attribute_id=41
LEFT JOIN lime_participant_attribute attribute42 ON attribute42.participant_id=p.participant_id AND attribute42.attribute_id=42
LEFT JOIN lime_participant_attribute attribute43 ON attribute43.participant_id=p.participant_id AND attribute43.attribute_id=43
LEFT JOIN lime_participant_attribute attribute44 ON attribute44.participant_id=p.participant_id AND attribute44.attribute_id=44
LEFT JOIN lime_participant_attribute attribute45 ON attribute45.participant_id=p.participant_id AND attribute45.attribute_id=45
LEFT JOIN lime_participant_attribute attribute46 ON attribute46.participant_id=p.participant_id AND attribute46.attribute_id=46
LEFT JOIN lime_participant_attribute attribute47 ON attribute47.participant_id=p.participant_id AND attribute47.attribute_id=47
LEFT JOIN lime_participant_attribute attribute48 ON attribute48.participant_id=p.participant_id AND attribute48.attribute_id=48
LEFT JOIN lime_participant_attribute attribute49 ON attribute49.participant_id=p.participant_id AND attribute49.attribute_id=49
LEFT JOIN lime_participant_attribute attribute50 ON attribute50.participant_id=p.participant_id AND attribute50.attribute_id=50
LEFT JOIN lime_participant_attribute attribute51 ON attribute51.participant_id=p.participant_id AND attribute51.attribute_id=51
LEFT JOIN lime_participant_attribute attribute52 ON attribute52.participant_id=p.participant_id AND attribute52.attribute_id=52
LEFT JOIN lime_participant_attribute attribute53 ON attribute53.participant_id=p.participant_id AND attribute53.attribute_id=53
LEFT JOIN lime_participant_attribute attribute54 ON attribute54.participant_id=p.participant_id AND attribute54.attribute_id=54
LEFT JOIN lime_participant_attribute attribute55 ON attribute55.participant_id=p.participant_id AND attribute55.attribute_id=55
LEFT JOIN lime_participant_attribute attribute56 ON attribute56.participant_id=p.participant_id AND attribute56.attribute_id=56
LEFT JOIN lime_participant_attribute attribute57 ON attribute57.participant_id=p.participant_id AND attribute57.attribute_id=57
LEFT JOIN lime_participant_attribute attribute58 ON attribute58.participant_id=p.participant_id AND attribute58.attribute_id=58
LEFT JOIN lime_participant_attribute attribute59 ON attribute59.participant_id=p.participant_id AND attribute59.attribute_id=59
LEFT JOIN lime_participant_attribute attribute60 ON attribute60.participant_id=p.participant_id AND attribute60.attribute_id=60
LEFT JOIN lime_participant_attribute attribute61 ON attribute61.participant_id=p.participant_id AND attribute61.attribute_id=61
LEFT JOIN lime_participant_attribute attribute62 ON attribute62.participant_id=p.participant_id AND attribute62.attribute_id=62
LEFT JOIN lime_participant_attribute attribute63 ON attribute63.participant_id=p.participant_id AND attribute63.attribute_id=63
LEFT JOIN lime_participant_attribute attribute64 ON attribute64.participant_id=p.participant_id AND attribute64.attribute_id=64
LEFT JOIN lime_participant_attribute attribute65 ON attribute65.participant_id=p.participant_id AND attribute65.attribute_id=65
LEFT JOIN lime_participant_attribute attribute66 ON attribute66.participant_id=p.participant_id AND attribute66.attribute_id=66
LEFT JOIN lime_participant_attribute attribute67 ON attribute67.participant_id=p.participant_id AND attribute67.attribute_id=67
LEFT JOIN lime_participant_attribute attribute68 ON attribute68.participant_id=p.participant_id AND attribute68.attribute_id=68
LEFT JOIN lime_participant_attribute attribute69 ON attribute69.participant_id=p.participant_id AND attribute69.attribute_id=69
LEFT JOIN lime_participant_attribute attribute70 ON attribute70.participant_id=p.participant_id AND attribute70.attribute_id=70
LEFT JOIN lime_participant_attribute attribute71 ON attribute71.participant_id=p.participant_id AND attribute71.attribute_id=71
LEFT JOIN lime_participant_attribute attribute72 ON attribute72.participant_id=p.participant_id AND attribute72.attribute_id=72
LEFT JOIN lime_participant_attribute attribute73 ON attribute73.participant_id=p.participant_id AND attribute73.attribute_id=73
LEFT JOIN lime_participant_attribute attribute74 ON attribute74.participant_id=p.participant_id AND attribute74.attribute_id=74
LEFT JOIN lime_participant_attribute attribute75 ON attribute75.participant_id=p.participant_id AND attribute75.attribute_id=75
LEFT JOIN lime_participant_attribute attribute76 ON attribute76.participant_id=p.participant_id AND attribute76.attribute_id=76
LEFT JOIN lime_participant_attribute attribute77 ON attribute77.participant_id=p.participant_id AND attribute77.attribute_id=77
LEFT JOIN lime_participant_attribute attribute78 ON attribute78.participant_id=p.participant_id AND attribute78.attribute_id=78
LEFT JOIN lime_participant_attribute attribute79 ON attribute79.participant_id=p.participant_id AND attribute79.attribute_id=79
LEFT JOIN lime_participant_attribute attribute80 ON attribute80.participant_id=p.participant_id AND attribute80.attribute_id=80
LEFT JOIN lime_participant_attribute attribute81 ON attribute81.participant_id=p.participant_id AND attribute81.attribute_id=81
LEFT JOIN lime_participant_attribute attribute82 ON attribute82.participant_id=p.participant_id AND attribute82.attribute_id=82
LEFT JOIN lime_participant_attribute attribute83 ON attribute83.participant_id=p.participant_id AND attribute83.attribute_id=83
LEFT JOIN lime_participant_attribute attribute84 ON attribute84.participant_id=p.participant_id AND attribute84.attribute_id=84
LEFT JOIN lime_participant_attribute attribute85 ON attribute85.participant_id=p.participant_id AND attribute85.attribute_id=85
LEFT JOIN lime_participant_attribute attribute86 ON attribute86.participant_id=p.participant_id AND attribute86.attribute_id=86
LEFT JOIN lime_participant_attribute attribute87 ON attribute87.participant_id=p.participant_id AND attribute87.attribute_id=87
LEFT JOIN lime_participant_attribute attribute88 ON attribute88.participant_id=p.participant_id AND attribute88.attribute_id=88
LEFT JOIN lime_participant_attribute attribute89 ON attribute89.participant_id=p.participant_id AND attribute89.attribute_id=89
LEFT JOIN lime_participant_attribute attribute90 ON attribute90.participant_id=p.participant_id AND attribute90.attribute_id=90
LEFT JOIN lime_participant_attribute attribute91 ON attribute91.participant_id=p.participant_id AND attribute91.attribute_id=91
LEFT JOIN lime_participant_attribute attribute92 ON attribute92.participant_id=p.participant_id AND attribute92.attribute_id=92
LEFT JOIN lime_participant_attribute attribute93 ON attribute93.participant_id=p.participant_id AND attribute93.attribute_id=93
LEFT JOIN lime_participant_attribute attribute94 ON attribute94.participant_id=p.participant_id AND attribute94.attribute_id=94
LEFT JOIN lime_participant_attribute attribute95 ON attribute95.participant_id=p.participant_id AND attribute95.attribute_id=95
LEFT JOIN lime_participant_attribute attribute96 ON attribute96.participant_id=p.participant_id AND attribute96.attribute_id=96
LEFT JOIN lime_participant_attribute attribute97 ON attribute97.participant_id=p.participant_id AND attribute97.attribute_id=97
LEFT JOIN lime_participant_attribute attribute98 ON attribute98.participant_id=p.participant_id AND attribute98.attribute_id=98
LEFT JOIN lime_participant_attribute attribute99 ON attribute99.participant_id=p.participant_id AND attribute99.attribute_id=99
LEFT JOIN lime_participant_attribute attribute100 ON attribute100.participant_id=p.participant_id AND attribute100.attribute_id=100
LEFT JOIN lime_participant_attribute attribute101 ON attribute101.participant_id=p.participant_id AND attribute101.attribute_id=101
LEFT JOIN lime_participant_attribute attribute102 ON attribute102.participant_id=p.participant_id AND attribute102.attribute_id=102
LEFT JOIN lime_participant_attribute attribute103 ON attribute103.participant_id=p.participant_id AND attribute103.attribute_id=103
LEFT JOIN lime_participant_attribute attribute104 ON attribute104.participant_id=p.participant_id AND attribute104.attribute_id=104
LEFT JOIN lime_participant_attribute attribute105 ON attribute105.participant_id=p.participant_id AND attribute105.attribute_id=105
LEFT JOIN lime_participant_attribute attribute106 ON attribute106.participant_id=p.participant_id AND attribute106.attribute_id=106
LEFT JOIN lime_participant_attribute attribute107 ON attribute107.participant_id=p.participant_id AND attribute107.attribute_id=107
LEFT JOIN lime_participant_attribute attribute108 ON attribute108.participant_id=p.participant_id AND attribute108.attribute_id=108
LEFT JOIN lime_participant_attribute attribute109 ON attribute109.participant_id=p.participant_id AND attribute109.attribute_id=109
LEFT JOIN lime_participant_attribute attribute110 ON attribute110.participant_id=p.participant_id AND attribute110.attribute_id=110
LEFT JOIN lime_participant_attribute attribute111 ON attribute111.participant_id=p.participant_id AND attribute111.attribute_id=111
LEFT JOIN lime_participant_attribute attribute112 ON attribute112.participant_id=p.participant_id AND attribute112.attribute_id=112
LEFT JOIN lime_participant_attribute attribute113 ON attribute113.participant_id=p.participant_id AND attribute113.attribute_id=113
/home/www/limesurvey/framework/db/CDbCommand.php(543)
531 {
532 if($this->_connection->enableProfiling)
533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534
535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536 $message=$e->getMessage();
537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539
540 if(YII_DEBUG)
541 $message.='. The SQL statement executed was: '.$this->getText().$par;
542
543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545 }
546 }
547
548 /*
549 Builds a SQL SELECT statement from the given query specification.
550 @param array $query the query specification in name-value pairs. The following
551 query options are supported: {@link select}, {@link distinct}, {@link from},
552 {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553 {@link limit}, {@link offset} and {@link union}.
554 @throws CDbException if "from" key is not present in given query parameter
555 @return string the SQL statement
Stack Trace
#0
- /home/www/limesurvey/framework/db/CDbCommand.php(396): CDbCommand->queryInternal("fetchAll", array(2), array())
#1
– /home/www/limesurvey/application/models/Participant.php(253): CDbCommand->queryAll()
248
249 function getParticipants($page, $limit,$attid, $order = null, $search = null, $userid = null)
250 {
251 $data = $this->getParticipantsSelectCommand(false, $attid, $search, $userid, $page, $limit, $order);
252
253 $allData = $data->queryAll();
254
255 return $allData;
256 }
257
258 /
#2
– /home/www/limesurvey/application/controllers/admin/participantsaction.php(105): Participant->getParticipants(0, 0, array("0", "1", "2", "3", ...), null, ...)
100 $iUserID = null;
101 } else {
102 $iUserID = Yii::app()->session['loginID'];
103 }
104
105 $query = Participant::model()->getParticipants(0, 0, $aAttributeIDs, null, $search, $iUserID);
106 if (!$query)
107 return false;
108
109 // Field names in the first row
110 $fields = array('participant_id', 'firstname', 'lastname', 'email', 'language', 'blacklisted', 'owner_uid');
#3
– /home/www/limesurvey/application/controllers/admin/participantsaction.php(745): participantsaction->csvExport(null, array("0", "1", "2", "3", ...))
740 $search = Participant::model()->getParticipantsSearchMultipleCondition($condition);
741 } else {
742 $search = null;
743 }
744 $aAttributes=explode('+',Yii::app()->request->getPost('attributes',''));
745 $this->csvExport($search,$aAttributes);
746 }
747
748 /
749 Equal to getParticipants_json() but now with a search
750 /
#4
unknown(0): participantsaction->exporttocsv()
#5
- /home/www/limesurvey/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(participantsaction, array())
#6
- /home/www/limesurvey/application/core/Survey_Common_Action.php(99): CAction->runWithParamsInternal(participantsaction, ReflectionMethod, array("sa" => "exporttocsv"))
#7
- /home/www/limesurvey/application/controllers/admin/participantsaction.php(50): Survey_Common_Action->runWithParams(array("sa" => "exporttocsv"))
#8
- /home/www/limesurvey/framework/web/CController.php(308): participantsaction->runWithParams(array("sa" => "exporttocsv"))
#9
- /home/www/limesurvey/framework/web/CController.php(286): CController->runAction(participantsaction)
#10
- /home/www/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(participantsaction, array())
#11
- /home/www/limesurvey/application/controllers/AdminController.php(169): CController->run("participants")
#12
- /home/www/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("participants")
#13
- /home/www/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/participants/sa/exporttocsv")
#14
- /home/www/limesurvey/framework/base/CApplication.php(180): CWebApplication->processRequest()
#15
- /home/www/limesurvey/index.php(200): CApplication->run()
2014-05-08 12:32:42 Apache Yii Framework/1.1.14
|