Menu

#7 Survey Block

open-accepted
nobody
None
5
2008-10-28
2008-10-17
Frank Lace
No

if the options a name implies a question mark, a modification the query will be wrong.
replace question mark the bID

for example:
survey options: sssss? and zzzzz
bID: 46
wrong query: DELETE FROM btSurveyOptions WHERE optionName NOT IN ('sssss'46'','zzzzz') AND bID =

Discussion

  • Frank Lace

    Frank Lace - 2008-10-21

    I found the solution.
    My solution:
    blocks/survey/controller.php line:151
    change this:
    $db->query("DELETE FROM btSurveyOptions WHERE optionName NOT IN ('".implode("','",$args['survivingOptionNames'])."') AND bID = ?",array($this->bID));
    for this:
    $db->query("DELETE FROM btSurveyOptions WHERE optionName NOT IN ('".implode("','",$args['survivingOptionNames'])."') AND bID =".$this->bID);

     
  • Andrew Embler

    Andrew Embler - 2008-10-28

    Thanks for the patch. We will include this.

     
  • Andrew Embler

    Andrew Embler - 2008-10-28
    • status: open --> open-accepted
     
  • Andrew Embler

    Andrew Embler - 2008-10-28

    I think we may have a different issue on this, when including apostrophes. We'll investigate.

     

Log in to post a comment.

Monday.com Logo