View Single Post
  #289  
Old 07-08-2008, 11:17 AM
J98680Bxxxxx J98680Bxxxxx is offline
 
Join Date: Jan 2008
Location: Bridge - Enterprise
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tekguru View Post
Still getting:

PHP Code:
Database error in vBulletin 3.7.2:

Invalid SQL:
INSERT INTO vb_pollvote (pollid,userid,votedate,voteoption,votetypeVALUES ('32','2','1215514729','6','0');

MySQL Error   Duplicate entry '32-2-0' for key 2
Error Number  
1062
Request Date  
TuesdayJuly 8th 2008 11:58:49 AM
Error Date    
TuesdayJuly 8th 2008 11:58:50 AM
Script        
http://www.4winmobile.com/forums/nominate_topic.php?do=nominate_topic_add&p=188842&securitytoken=1215514535-f4d5b334a5e5b51c957c2bc04eba1ddc7990ca2c
Referrer      http://www.4winmobile.com/forums/windows-chat-xp-mce2004-2005-vista/16712-rocketdock.html
IP Address    78.86.46.67
Username      
windows
Classname     
vB_Database
MySQL Version 
5.0.51a-community 
Looks like I will have to disable it, this is with running v1.22....

The following edit was made in "functions_nominate_topic.php" on v 1.22 to prevent that error:


Code:
if ($vote_option > 0){
	$get_pollvote = $vbulletin->db->query_read("SELECT * FROM ". TABLE_PREFIX ."pollvote WHERE userid = '$user_id' AND pollid = '$poll_id' AND voteoption = '$vote_option' AND votetype ='$vote_option'");
	$nb_pollvote = $vbulletin->db->num_rows($get_pollvote);
	if ($nb_pollvote == 0){
		$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "pollvote (pollid,userid,votedate,voteoption,votetype) VALUES ('$poll_id','$user_id','$now','$vote_option','$vote_option')");
	}
}

From your report:

Quote:
Database error in vBulletin 3.7.2:

Invalid SQL:
INSERT INTO vb_pollvote (pollid,userid,votedate,voteoption,votetype) VALUES ('32','2','1215514729','6','0');

$vote_option = 6, the same value is assigned to 'votetype' in the "functions_nominate_topic.php" up-to-date file, see code above, and not '0' as shown on your feedback above, hence this error will not occur if you have the file "functions_nominate_topic.php" not up-to-date.

Redownload the attachment and upload the "functions_nominate_topic.php".
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01343 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete