BUGFIX Fixed mssql error when attempting to export data using SELECT DISTINCT query in SubmittedFormReportField

This commit is contained in:
Sean Harvey 2010-01-08 03:03:35 +00:00
parent 70f05b891e
commit 468ebf4fcb

View File

@ -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) {