Fix erreur requête SQL anti-collision

This commit is contained in:
JosephK 2015-04-13 11:28:39 +02:00
parent 312272b1d0
commit 2c7dceeb19
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ function check_poll_id($id)
{ {
global $connect; 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); $sql = $connect->Prepare($sql);
$poll = $connect->Execute($sql, [$id]); $poll = $connect->Execute($sql, [$id]);

View File

@ -82,7 +82,7 @@ while ( $data=$user_studs->FetchNextObject(false)) {
for ($k=0;$k<$nbcolonnes;$k++) { for ($k=0;$k<$nbcolonnes;$k++) {
$car=substr($ensemblereponses,$k,1); $car=substr($ensemblereponses,$k,1);
switch ($car) { switch ($car) {
case "1": $input .= '"'._('Yes').'",'; $somme[$k]++; break; case "1": $input .= '"'._('Yes').'",'; break;
case "2": $input .= '"'._('Ifneedbe').'",'; break; case "2": $input .= '"'._('Ifneedbe').'",'; break;
default: $input .= '"'._('No').'",'; break; default: $input .= '"'._('No').'",'; break;
} }