Announcement

Collapse
No announcement yet.

Invalid SQL

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

  • Newmomsforum
    replied
    Originally posted by Dody View Post
    You need to disable your plugins
    Thanks dody but they were. As the issue only happened on one forum I fixed it by creating a new forum and moving all the posts from the 'dodgy' forum via admincp to the new one.

    Not sure why it fixed it but it worked so I won't worry to much about it just yet

    cheers

    Leave a comment:


  • Alan Rowley
    replied
    I think I may have cured my errors. I uninstalled, not just disabled, all my old 3.x mods and removed all remnants of the mods in the file system.

    The file that was causing the last error was 'articles.php' which was a remnant of the 'articles forum' mod. I can only assume that some search robot was attempting to access this file and generating the error.

    I have now deleted 'articles.php' and so far, I haven't had an error message.

    Leave a comment:


  • Dody
    replied
    Originally posted by Newmomsforum View Post
    Hey all, I'm also having the problem after an upgrade to 4.0

    All my forums work fine except one which is really weird.
    You need to disable your plugins

    Leave a comment:


  • Newmomsforum
    replied
    Hey all, I'm also having the problem after an upgrade to 4.0

    All my forums work fine except one which is really weird.

    Anyone else have any ideas

    My Error:

    Database error in vBulletin 4.0.0:

    Invalid SQL:

    SELECT
    IF(votenum >= 1, votenum, 0) AS votenum,
    IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
    post.pagetext AS preview,
    thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, postusername, postuserid, thread.iconid AS threadiconid,
    thread.dateline, notes, thread.visible, sticky, votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastposterid, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
    thread.prefixid, thread.taglist, hiddencount, deletedcount,
    user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend
    , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
    , deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason

    , threadredirect.expires
    , attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid
    FROM VB_thread AS thread
    LEFT JOIN VB_user AS user ON (user.userid = thread.lastposterid)
    LEFT JOIN VB_userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 1)
    LEFT JOIN VB_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
    LEFT JOIN VB_subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)

    LEFT JOIN VB_post AS post ON(post.postid = thread.firstpostid)

    LEFT JOIN VB_threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
    LEFT JOIN VB_attachment as attachment ON(attachment.postid = thread.firstpostid)
    WHERE thread.threadid IN (0,67153,67152,82602,82649,82561,64683,60769,82566,34220,82459,82518,82359,82063,82110,824 32,82556,41712,82567,82565,82564,46036,73864,50236,30261) GROUP BY thread.threadid
    ORDER BY sticky DESC, lastpost DESC;

    MySQL Error : Unknown column 'attachment.thumbnail_filesize' in 'field list'
    Error Number : 1054
    Request Date : Saturday, December 26th 2009 @ 01:55:28 AM
    Error Date : Saturday, December 26th 2009 @ 01:55:29 AM
    Script : http://www.newsgab.com/forumdisplay.php?f=36
    Referrer : http://www.newsgab.com/your-entertainment/
    IP Address : 203.206.91.236
    Username : Chief
    Classname : vB_Database
    MySQL Version : 5.0.85-community

    Leave a comment:


  • Alan Rowley
    replied
    Still getting an error, but it's changed to ...

    Code:
    Database error in vBulletin 4.0.0:
    
    Invalid SQL:
    
    		SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 1261739141 AND open <> 10, 1, 0)) AS newthread
    		FROM vbulletinthread AS thread
    		WHERE forumid IN( 0, )
    		 AND thread.visible = 1;
    
    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 ')
    		 AND thread.visible = 1' at line 3
    Error Number  : 1064
    Request Date  : Friday, December 25th 2009 @ 11:05:41 AM
    Error Date    : Friday, December 25th 2009 @ 11:05:41 AM
    Script        : http://www.thefollowon.com/community/articles.php?&order=desc&page=7
    Referrer      : 
    IP Address    : 67.195.111.165
    Username      : Unregistered
    Classname     : vB_Database_MySQLi
    MySQL Version :
    Anyone any suggestions?

    Leave a comment:


  • Alan Rowley
    replied
    OK. I have uninstalled all of my old 3.8 mods and now have only vBulletin, vBulletin CMS and vBulletin Blogs. If one of the old mods was causing the problem, uninstalling ought to get rid of the error message.

    Fingers still crossed.

    Leave a comment:


  • Dody
    replied
    Looking colser at my avB 4.0 attachment table, there is no "thumbnail_filesize" column by default. The only thing could cause this is a plugin.

    try to adddefine('DISABLE_HOOKS', true); to your config.php and see how it goes.

    Leave a comment:


  • Alan Rowley
    replied
    Hi Dody, thanks for trying to sort this out for me. The error isn't stopping the site from performing, but it's just frustrating that I can't figure out what's causing it.

    The forum had several plugins installed when I was running 3.8.4. I disabled all these when I upgraded to 4.0.0, but they are still present.

    The only plugins currently enabled are: vBulletin, vBulletin CMS and vBulletin Blogs.

    Leave a comment:


  • Dody
    replied
    Could this be due a plugin you have installed? try to disable them all if so.

    Leave a comment:


  • Alan Rowley
    replied
    Error continued, so in desperation, I have tried moving all the attachments from the database to the file system. Let's see if that cures the problem.

    EDIT: No joy. This is getting frustrating now.
    Last edited by Alan Rowley; Thu 24 Dec '09, 3:08am.

    Leave a comment:


  • Alan Rowley
    replied
    Still getting this error, so I have done as Dody suggested and run the upgrade process from the very beginning. If the error keeps happening, I will have to put in s support ticket - unless you guys suggest something else to try.

    Leave a comment:


  • Alan Rowley
    replied
    I've changed a few things and deleted an incompatible style and I haven't had an error for over an hour now. Fingers crossed ...

    Leave a comment:


  • Dody
    replied
    The error is caused because you have unknown column, which means the upgrade script didn't add it. If I was you, I would restart the upgrade process from upgrade_400a1.php and run it through until gold.

    Leave a comment:


  • Alan Rowley
    replied
    Nope - it didn't make any difference. I've run the upgrade script again and also optimised and repaired the tables. Still no joy.

    Anyone else have any ideas what's causing this?

    Leave a comment:


  • Alan Rowley
    replied
    Thanks Dody. I've run the upgrade again. Waiting to see what happens ...

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X