Announcement

Collapse
No announcement yet.

Database errors after moving to new server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database errors after moving to new server

    We just moved the site to a new beefier server.

    I was getting this error in the thread table, a repair fixed it.
    Warning: 2 clients are using or haven't closed the table properly

    This is the data I get after running this code DESCRIBE threads;
    Code:
    threadid  	int(10) unsigned  	NO  	PRI  	   	auto_increment
    This is the error i get when trying to get into the usercp.

    Code:
    Database error in vBulletin 3.0.7:
    
    Invalid SQL: 
    	SELECT thread.threadid, thread.forumid
    	FROM thread AS thread, subscribethread AS subscribethread
    	LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    	WHERE subscribethread.threadid = thread.threadid
    	AND subscribethread.userid = 109188
    	AND thread.visible = 1
    	AND lastpost > 1187732539
    	AND deletionlog.primaryid IS NULL
    
    mysql error: Unknown column 'thread.threadid' in 'on clause'
    
    mysql error number: 1054
    PHP - 4.4.3, MySQL - 4.0.27, vBulletin 3.0.7

    Any ideas or suggestions?
    Ken Iovino
    Full Time PHP, Ruby and iOS Developer

  • #2
    The first error is from corrupt tables. Try repairing the tables in phpMyAdmin first.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Originally posted by Ken Iovino View Post
      I was getting this error in the thread table, a repair fixed it.
      Any ideas why the thread.threadid column is showing up as unknown? If this was the case, then threads would not be showing up at all, but this only happens when going to the usercp.
      Ken Iovino
      Full Time PHP, Ruby and iOS Developer

      Comment


      • #4
        Sorry but I don't have a 3.0.7 db structure to compare this to and I don't even know if that is a standard vB query or one from an hack. My guess is that this is due to a modification you made.

        Have you installed any hacks? If not, then why haven't you upgraded?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Try this in your code (note the parenthesis in the FROM part of the statement):

          PHP Code:
          SELECT thread.threadidthread.forumid
              FROM 
          (thread AS threadsubscribethread AS subscribethread)
              
          LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid thread.threadid AND type 'thread')
              
          WHERE subscribethread.threadid thread.threadid
              
          AND subscribethread.userid 109188
              
          AND thread.visible 1
              
          AND lastpost 1187732539
              
          AND deletionlog.primaryid IS NULL 

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment

          Loading...
          Working...
          X