mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
BUGFIX: IN clause was not being picked up, failing in MSSQL and not giving proper results on MySQL (OS ticket 6072)
This commit is contained in:
parent
8d3cb472dc
commit
a2e998ab79
@ -96,7 +96,8 @@ class SubmittedFormReportField extends FormField {
|
||||
$csvHeaders = DB::query("SELECT DISTINCT \"Name\" , \"Title\" FROM
|
||||
((
|
||||
SELECT \"Name\" , \"Title\" FROM \"SubmittedFormField\"
|
||||
LEFT JOIN \"SubmittedForm\" ON \"SubmittedForm\".\"ID\" = \"SubmittedFormField\".\"ParentID\" IN (" . implode(',', $inClause) . ")
|
||||
LEFT JOIN \"SubmittedForm\" ON \"SubmittedForm\".\"ID\" = \"SubmittedFormField\".\"ParentID\"
|
||||
WHERE \"SubmittedFormField\".\"ParentID\" IN (" . implode(',', $inClause) . ")
|
||||
ORDER BY \"SubmittedFormField\".\"ParentID\" DESC, \"SubmittedFormField\".\"ID\"
|
||||
) AS \"tmp\")");
|
||||
if ($csvHeaders) $csvHeaders = $csvHeaders->map();
|
||||
|
@ -63,7 +63,7 @@ class SubmittedFormTest extends FunctionalTest {
|
||||
// check the headers are fine and include every legacy field. They should also be ordered
|
||||
// according to the latest form layout.
|
||||
$this->assertEquals($data[0], array(
|
||||
'First', 'Submitted Title 2', 'Submitted Title', 'Field 2', 'Field 1', 'File', 'Submitted'
|
||||
'First', 'Submitted Title 2', 'Submitted Title', 'Submitted'
|
||||
));
|
||||
|
||||
// check the number of records in the export
|
||||
|
Loading…
x
Reference in New Issue
Block a user