vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Weird DB error (https://vborg.vbsupport.ru/showthread.php?t=54467)

DaveG 06-18-2003 12:20 AM

Weird DB error
 
I'm getting a weird db error when in the updating counters section of the admin CP in my 2.2.7 VB board.

Everything works OK except for the following command:

Update Thread Info - update thread post counts, original posters, last post date, attachment totals

When I click update for the default 2000 threads at a time update (or put any number in there) I get the following error:

Code:

Thread ids:
Processing thread 528

   

    There seems to have been a slight problem with the Domain.com database.
    Please try again by pressing the refresh button in your browser.
    An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

    We apologise for any inconvenience.

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE thread SET lastpost=1031259149,replycount=0,postusername='DaveG', postuserid='3', lastposter='DaveG',attach= WHERE threadid=528
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE threadid=528' at line 1

mysql error number: 1064

Date: Tuesday 17th of June 2003 09:20:38 PM
Script: http://www.domain.com/forum/forum/admin/misc.php
Referer:

Any idea what this all means? One thing that comes to my mind is that the forum admin stuff is is NOT located at /forum/forum/admin, just /forum/admin. But I've made no changes to anything so what is going on?

Any help would be appreciated, thanks!

Steve Machol 06-18-2003 02:42 AM

Reupload your original admin/misc.php file.

The double 'forum' means nothing. It's an artifact of the error process.

DaveG 06-18-2003 09:51 AM

I've done this (uploaded the original misc.php file) and still get the same error. Any ideas? I don't believe I've ever touched this file, anyway.

msimplay 06-18-2003 10:38 AM

hmm this is extremely weird i am having the very same error
i even made a post about it
one below urs
https://vborg.vbsupport.ru/showthrea...threadid=54475

i'm using version 2.30 release candidate 3

DaveG 06-18-2003 10:50 AM

Very strange.. I am using my original misc.php also. I'll note that I did in fact delete a bunch of the threads that the script got stuck on. But when I rerun the script, it finds new threads to get stuck on!

Hopefully someone will have an idea.

msimplay 06-18-2003 06:24 PM

i hope so too that scripts fone mashed for some reason it was ok yesterday tho :S

ap0c 06-18-2003 10:56 PM

having the same problem also, 2.30 final

edit :
answer and qiuck fix

http://www.vbulletin.com/forum/showt...te+thread+info

DaveG 06-19-2003 01:27 AM

I read the messages over at vb.com and see that I need to enter the following code
Code:

if ($attachsum == "1") {$attachsum = "1";} else {$attachsum = "0";}
But where exactly do I put this, and in what file?

S.Shady 06-19-2003 02:45 AM

Quote:

Today at 10:27 PM DaveG said this in Post #8
I read the messages over at vb.com and see that I need to enter the following code
Code:

if ($attachsum == "1") {$attachsum = "1";} else {$attachsum = "0";}
But where exactly do I put this, and in what file?


i thought it ment put it above (but this didnt work)

// ###################### Start update threads #######################

then i put it under it and that didnt work

DaveG 06-19-2003 02:51 AM

I figured it out...

Put that line of code before the following in misc.php
Code:

    $DB_site->query("UPDATE thread SET lastpost=$lastpost,replycount=$numberposts,postusername='".addslashes($firstusername)."', postuserid='$firstuserid', lastposter='".addslashes($lastusername)."',attach=$attachsum WHERE threadid=$threadid");
This worked for me.


All times are GMT. The time now is 09:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01099 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete