From 2c7dceeb19c0b272757ea8018193a0c19aee3a34 Mon Sep 17 00:00:00 2001
From: JosephK <josephk@framasoft.org>
Date: Mon, 13 Apr 2015 11:28:39 +0200
Subject: [PATCH] =?UTF-8?q?Fix=20erreur=20requ=C3=AAte=20SQL=20anti-collis?=
 =?UTF-8?q?ion?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 creation_sondage.php | 2 +-
 exportcsv.php        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/creation_sondage.php b/creation_sondage.php
index 948d43bc..459ebe25 100644
--- a/creation_sondage.php
+++ b/creation_sondage.php
@@ -43,7 +43,7 @@ function check_poll_id($id)
 {
     global $connect;
 
-    $sql = 'SELECT `id_sondage` FROM sondage`id_sondage` = ' . $connect->Param('id_sondage') ;
+    $sql = 'SELECT `id_sondage` FROM sondage WHERE `id_sondage` = ' . $connect->Param('id_sondage') ;
     $sql     = $connect->Prepare($sql);
     $poll = $connect->Execute($sql, [$id]);
 
diff --git a/exportcsv.php b/exportcsv.php
index fd868bff..927d57f5 100644
--- a/exportcsv.php
+++ b/exportcsv.php
@@ -82,7 +82,7 @@ while ( $data=$user_studs->FetchNextObject(false)) {
     for ($k=0;$k<$nbcolonnes;$k++) {
         $car=substr($ensemblereponses,$k,1);
         switch ($car) {
-            case "1": $input .= '"'._('Yes').'",'; $somme[$k]++; break;
+            case "1": $input .= '"'._('Yes').'",'; break;
             case "2": $input .= '"'._('Ifneedbe').'",'; break;
             default: $input .= '"'._('No').'",'; break;
         }
-- 
GitLab