Skip to content

Commit

Permalink
Fix sql error
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 1, 2024
1 parent 77306d7 commit 6f4f38e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion htdocs/opensurvey/class/opensurveysondage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ public function fetch($id, $numsurvey = '')
*/
public function update(User $user, $notrigger = 0)
{
global $conf, $langs;
$error = 0;

// Clean parameters
Expand Down
4 changes: 2 additions & 2 deletions htdocs/opensurvey/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors');
$error++;
} else {
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses)';
$sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."','".$db->escape($nouveauchoix)."')";
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, date_creation)';
$sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."', '".$db->escape($nouveauchoix)."', '".$db->idate(dol_now())."')";
$resql = $db->query($sql);
if (!$resql) {
dol_print_error($db);
Expand Down

0 comments on commit 6f4f38e

Please sign in to comment.