PDA

View Full Version : Weird DB error


DaveG
06-18-2003, 12:20 AM
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:


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='Dav eG', 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/showthread.php?s=&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/showthread.php?threadid=73766&highlight=update+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

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
Today at 10:27 PM DaveG said this in Post #8 (https://vborg.vbsupport.ru/showthread.php?postid=410572#post410572)
I read the messages over at vb.com and see that I need to enter the following 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

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

This worked for me.

S.Shady
06-19-2003, 03:20 AM
thank you very much. :) worked perfectly