From 84b2d7e9746307e56a8c75fd5dba51c5efc62674 Mon Sep 17 00:00:00 2001 From: Valcoop <74793548+Valcoop@users.noreply.github.com> Date: Fri, 20 Nov 2020 22:19:17 +0100 Subject: [PATCH] FIX Bug where amount of voters was always 0 FIX Bug where amount of voters was always 0. Due to erroneous sql query build fetching the wrong column name. --- htdocs/opensurvey/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index dbc38b7b197..f4f316122fb 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -349,7 +349,7 @@ while ($i < min($num, $limit)) $obj = $db->fetch_object($resql); if (empty($obj)) break; // Should not happen - $sql2 = 'select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->id_sondage)."'"; + $sql2 = 'select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->rowid)."'"; $resql2 = $db->query($sql2); if ($resql2) {