Print Page | Close Window

Bug deleting polls & fix

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4597
Printed Date: 02 April 2026 at 9:53am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Bug deleting polls & fix
Posted By: fernan82
Subject: Bug deleting polls & fix
Date Posted: 29 July 2003 at 2:18pm
I found a minor bug on the forums, when you delete the last post on a topic that has a poll using the delete button at the bottom of the post the poll is not deleted... The solution for this add the following code on delete_post.asp:

     If rsTopicDelete("Poll_ID") > 0 Then


          'Delete the Poll choices
          strSQL = "DELETE FROM " & strDbTable & "PollChoice WHERE " & strDbTable & "PollChoice.Poll_ID=" & rsTopicDelete("Poll_ID") & ";"

          'Write to database
          adoCon.Execute(strSQL)

          'Delete the Poll
          strSQL = "DELETE FROM " & strDbTable & "Poll WHERE " & strDbTable & "Poll.Poll_ID=" & rsTopicDelete("Poll_ID") & ";"

          'Write to database
          adoCon.Execute(strSQL)

     End If


right next to these lines:

     'If there are no more threads in the database for the topic then delete the topic from the database

     Else


sorry I can't post the exact line # but I've modded my forums a lot and it would be different...






-------------
FeRnAN
http://www.danasoft.com/">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net