Attachment database error in 3.8.4, invalid sql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HenrikHansen
    Senior Member
    • Jul 2004
    • 155
    • 3.8.x

    Attachment database error in 3.8.4, invalid sql

    I frequently get this databaserror. What should I do to get rid of it?

    Database error in vBulletin 3.8.4:

    Invalid SQL:

    SELECT
    filename, ba.blogid, ba.userid, ba.attachmentid, ba.extension, ba.visible, attachmenttype.mimetype,
    ba.dateline, filesize,
    blog.blogid, blog.state, blog.pending, blog.postedby_userid,
    bu.memberids, bu.memberblogids,
    user.membergroupids, user.usergroupid, user.infractiongroupids


    FROM blog_attachment AS ba
    LEFT JOIN attachmenttype AS attachmenttype ON (attachmenttype.extension = ba.extension)
    LEFT JOIN blog AS blog ON (ba.blogid = blog.blogid)
    LEFT JOIN blog_user AS bu ON (bu.bloguserid = blog.userid)
    LEFT JOIN user AS user ON (user.userid = blog.userid)



    WHERE attachmentid = 1 AND options_guest & AND ~blog.options &;

    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 ~blog.options &' at line 17
    Error Number : 1064
    Request Date : Saturday, February 20th 2010 @ 06:40:51 PM
    Error Date : Saturday, February 20th 2010 @ 06:40:51 PM
    Script : http://xxx/forum/blog_attachment.php...1&d=1255725561
    Referrer :
    IP Address : 66.249.71.112
    Username : ()
    Classname : vB_Database
    MySQL Version :
    Europanet.dk
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24325
    • 5.7.X

    #2
    To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

    Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

    [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

    Next, disable all plugins.

    Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

    define('DISABLE_HOOKS', true);

    Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

    Do you have the same problem?
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

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