[Fusionforge-commits] r8102 - trunk/gforge/www/survey/admin

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Sep 4 16:51:41 CEST 2009


Author: lolando
Date: 2009-09-04 16:51:41 +0200 (Fri, 04 Sep 2009)
New Revision: 8102

Modified:
   trunk/gforge/www/survey/admin/show_results_aggregate.php
Log:
Fixed syntax errors

Modified: trunk/gforge/www/survey/admin/show_results_aggregate.php
===================================================================
--- trunk/gforge/www/survey/admin/show_results_aggregate.php	2009-09-04 14:43:44 UTC (rev 8101)
+++ trunk/gforge/www/survey/admin/show_results_aggregate.php	2009-09-04 14:51:41 UTC (rev 8102)
@@ -185,16 +185,18 @@
 		// average
 	    if ( $sys_database_type == "mysql" ) {
 
-		    $result2 = db_query_params ('SELECT avg(response) AS avg FROM survey_responses WHERE survey_id=$1 AND question_id=$2 AND group_id=$3  and response != ''',
+		    $result2 = db_query_params ('SELECT avg(response) AS avg FROM survey_responses WHERE survey_id=$1 AND question_id=$2 AND group_id=$3  and response != $4',
 						array ($survey_id,
 						       $quest_array[$i],
-						       $group_id));
+						       $group_id,
+						       ''));
 		} else {
 
-		    $result2 = db_query_params ('SELECT avg(response::int) AS avg FROM survey_responses WHERE survey_id=$1 AND question_id=$2 AND group_id=$3  and response != ''',
+		    $result2 = db_query_params ('SELECT avg(response::int) AS avg FROM survey_responses WHERE survey_id=$1 AND question_id=$2 AND group_id=$3  and response != $4',
 						array ($survey_id,
 						       $quest_array[$i],
-						       $group_id));
+						       $group_id,
+							''));
 		}
 
 		if (!$result2 || db_numrows($result2) < 1) {




More information about the Fusionforge-commits mailing list