Problem with deleting poll.

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
T-Keith
Registered User
Posts: 54
Joined: Wed Mar 06, 2002 3:13 pm

Problem with deleting poll.

Post by T-Keith »

URL: lesabret.com/phpBB
Template(s) used: ?
Any and all MODs: none
Do you use a port of phpBB: no
Version of phpBB: 2.0.6
Version of PHP: 4
Which database server and version: mySQL
Host: Whizhost.com
Did someone install this for you/who: no
Is this an upgrade/from what to what: 1.4
Is this a conversion/from what to what: no
Have you searched for your problem: yes
If so, what terms did you try: missing posts, ect.
State the nature of your problem:

I got this error when deleting a poll:



SQL Error : 1064 You have an error in your SQL syntax near '' at line 2

DELETE FROM phpbb_vote_results WHERE vote_id =

Line : 544
File : /usr/local/psa/home/vhosts/lesabret.com/httpdocs/phpBB/includes/functions_post.php


On another note, the polls don't get pruned with the rest of the topics. I know this is probably because the user has chosen a never ending poll or a really long one. But how do I stop this?

thanks,
-T
User avatar
zeroK
Former Team Member
Posts: 20964
Joined: Sun Jan 20, 2002 7:36 pm
Location: Klagenfurt / Austria
Contact:

Post by zeroK »

What do your includes/functions_posts.php's lines 540 and 541 look like?
Image My weblog | gamerslog.com | No support via PM or ICQ or email - If you don't know a term or a program mentioned in a post -> Google is your friend
T-Keith
Registered User
Posts: 54
Joined: Wed Mar 06, 2002 3:13 pm

Post by T-Keith »

I did find the answer to my second question:

http://www.phpbb.com/phpBB/viewtopic.ph ... poll+prune

Thanks for the help zeroK, I'll check it when I get home tonight.

-T
wtfdit74
Registered User
Posts: 20
Joined: Sun Dec 28, 2003 10:59 pm

Post by wtfdit74 »

I am having exactly the same problem.....
cr95gst
Registered User
Posts: 1
Joined: Wed Apr 23, 2003 5:33 am
Location: FLORIDA

Post by cr95gst »

Yep, same problem here as well.
User avatar
Vampy
Registered User
Posts: 140
Joined: Mon May 12, 2003 4:25 pm

Post by Vampy »

I'm getting exactly the smae error as well. I dunno if it's due to patching it to 2.0.6d. In any case this is the offending line in the file:

Code: Select all

$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " 
			WHERE vote_id = $poll_id";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}
Anyone can advise on this?
Julian
Locked

Return to “2.0.x Support Forum”