Skip to content

Commit

Permalink
Requete sql insert des options défaillante quand sondages avec noms i…
Browse files Browse the repository at this point in the history
…dentiques

Co-Authored-By: Jireck-npds <16939826+Jireck-npds@users.noreply.github.com>

#553
  • Loading branch information
jipexu committed May 21, 2024
1 parent 90f9971 commit 7aeaef0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions revolution_16/admin/polls.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ function poll_createPosted() {

$timeStamp = time();
$pollTitle = FixQuotes($pollTitle);
$result = sql_query("INSERT INTO ".$NPDS_Prefix."poll_desc VALUES (NULL, '$pollTitle', '$timeStamp', 0)");
$object = sql_fetch_assoc(sql_query("SELECT pollID FROM ".$NPDS_Prefix."poll_desc WHERE pollTitle='$pollTitle'"));
$id = $object['pollID'];
$result = sql_query("INSERT INTO ".$NPDS_Prefix."poll_desc VALUES (0, '$pollTitle', '$timeStamp', 0)");
$id = sql_last_id();
for ($i = 1; $i <= sizeof($optionText); $i++) {
if ($optionText[$i] != '')
$optionText[$i] = FixQuotes($optionText[$i]);
Expand Down

0 comments on commit 7aeaef0

Please sign in to comment.