attachmentgallery.php sql error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andyucs
    New Member
    • Apr 2007
    • 17
    • 3.8.x

    attachmentgallery.php sql error

    just notice this today and have no idea why any help please


    Database error in vBulletin 4.2.3 Beta 3:

    Invalid SQL:

    SELECT
    IF(a.votenum >= 1, a.votenum, 0) AS votenum,
    IF(a.votenum >= 1 AND a.votenum > 0, a.votetotal / a.votenum, 0) AS voteavg,
    a.*, fd.extension AS extension, IF(r.attachrateid >= 1, 1, 0) AS hasvoted,
    p.title AS posttitle, p.postid AS postid, u.username
    FROM attachment AS a
    JOIN post AS p
    ON (a.contentid = p.postid AND a.contenttypeid = 1)
    LEFT JOIN user AS u
    ON (a.userid = u.userid)
    LEFT JOIN thread AS t
    ON (p.threadid = t.threadid)
    LEFT JOIN filedata AS fd
    ON (fd.filedataid = a.filedataid)
    LEFT JOIN attachrate AS r
    ON (a.attachmentid = r.attachid AND r.userid = '1')
    WHERE a.contenttypeid = 1

    AND fd.extension IS NOT NULL
    AND t.forumid IN (131,135,1,109,47,2,24,49,61,87,132,65,46,21,44,14,16,129,18,67,111,62,78,116,115,121,127, 130,134,125,110,122,119,133,28,126,29,45,60,120,77,37,88,39,43,113,92,96,93,102,94,91,95,1 14,98,107,99,97,117,89,100,104,106,101,48,66,15,59)

    ORDER BY a.attachmentid DESC
    LIMIT 0,;

    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 '' at line 23
    Error Number : 1064
    Request Date : Sunday, February 1st 2015 @ 02:22:18 PM
    Error Date : Sunday, February 1st 2015 @ 02:22:19 PM
    Script : http://ucsclan.co.uk/attachmentgallery.php
    Referrer :

    MySQL Version : 5.5.40-cll

  • ozzy47
    Senior Member
    • Oct 2009
    • 215

    #2
    Hey there Andyucs,

    Since you are asking about Questions/Problems regarding a Modification/Style, you need to post in the Modifications/Styles thread where you downloaded it from.

    That is the proper place to get support for a Modification/Style, not out here in the main forums. Even if you already posted in the Modifications/Styles thread, and have not got a answer, that is not a excuse to post in the open forums. This includes third party Modifications/Styles that you may have got elsewhere.

    Please note that if a Modification/Style is unsupported (or even if it says it is supported), you may be on your own if you chose to install it.
    My Mods also available at OzzModz.com

    New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders!
    Stop Spam Now The era of Big Spam is over.

    Vote to bring back hooks in vB5, http://tracker.vbulletin.com/browse/VBV-10333

    Comment

    • Andyucs
      New Member
      • Apr 2007
      • 17
      • 3.8.x

      #3
      Hi ozzy47 thanks for taking the time to reply to this post , have you any idea as to what Modifications/Styles may be or have caused this as i dont have many on my forum

      and the error shows in all styles so i think mabe a Modifications has cause this

      anyway you can help please (I use 2 or your mods)

      thank you

      Andy

      Comment

      • ozzy47
        Senior Member
        • Oct 2009
        • 215

        #4
        Lets do this, disable plugins via the includes/config.php file.

        To do that open your includes/config.php file and below <?php add the following.

        PHP Code:
        define('DISABLE_HOOKS'true); 
        So it looks like this:
        PHP Code:
        <?php
        define
        ('DISABLE_HOOKS'true);
        /*=================================================  =====================*\
        || ##################################################  ################## ||
        || # vBulletin 4.2.2
        Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.

        If that fixes the issue enable plugins again by adding // before the line you added, then navigate to ACP --> Plugins & Products --> Manage Products and disable one mod at a time until you find the one causing the issue.

        Once you find the culprit, post in that mods thread what the issue is, and maybe someone in that thread can help.
        My Mods also available at OzzModz.com

        New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders!
        Stop Spam Now The era of Big Spam is over.

        Vote to bring back hooks in vB5, http://tracker.vbulletin.com/browse/VBV-10333

        Comment

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