mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX Fixed mssql error when attempting to export data using SELECT DISTINCT query in SubmittedFormReportField
This commit is contained in:
parent
70f05b891e
commit
468ebf4fcb
@ -83,7 +83,11 @@ class SubmittedFormReportField extends FormField {
|
||||
|
||||
// Get the CSV header rows from the database
|
||||
|
||||
$tmp = DB::query("SELECT DISTINCT \"Name\", \"Title\" FROM \"SubmittedFormField\" LEFT JOIN \"SubmittedForm\" ON \"SubmittedForm\".\"ID\" = \"SubmittedFormField\".\"ParentID\" WHERE \"SubmittedFormField\".\"ParentID\" IN (" . implode(',', $inClause) . ") ORDER BY \"SubmittedFormField\".\"ID\"");
|
||||
$tmp = DB::query("SELECT DISTINCT \"SubmittedFormField\".\"ID\", \"Name\", \"Title\"
|
||||
FROM \"SubmittedFormField\"
|
||||
LEFT JOIN \"SubmittedForm\" ON \"SubmittedForm\".\"ID\" = \"SubmittedFormField\".\"ParentID\"
|
||||
WHERE \"SubmittedFormField\".\"ParentID\" IN (" . implode(',', $inClause) . ")
|
||||
ORDER BY \"SubmittedFormField\".\"ID\"");
|
||||
|
||||
// Sort the Names and Titles from the database query into separate keyed arrays
|
||||
foreach($tmp as $array) {
|
||||
|
Loading…
Reference in New Issue
Block a user