Invalid SQL on Attachment Search using "Attached After"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LBS
    Member
    • Mar 2007
    • 46
    • 5.5.x

    Invalid SQL on Attachment Search using "Attached After"

    Specs:
    -VB: 5.1.3
    -PHP: 5.6.0
    -MySQL: 5.5.39-log

    In AdminCP I get an invalid SQL error when searching for attachments.

    Steps:
    1) I go to Admin CP > Attachments > Search
    2) Enter "2014-01-01" as "Attached After" value, and hit "Search"

    Then VB returns the following error in debug mode:
    Code:
    Debug: Error
    Database error in vBulletin 5.1.3: Invalid SQL: SELECT COUNT(*) AS count, SUM(fd.filesize) AS sum FROM node AS node INNER JOIN attach AS a ON (node.nodeid = a.nodeid) INNER JOIN filedata AS fd ON (a.filedataid = fd.filedataid) WHERE a.nodeid <> 0 AND a.dateline > UNIX_TIMESTAMP('2014-01-01'); MySQL Error : Unknown column 'a.dateline' in 'where clause' Error Number : 1054 Request Date : Monday, September 15th 2014 @ 11:20:02 PM Error Date : Monday, September 15th 2014 @ 11:20:02 PM Script : http:///admincp/attachment.php?do=search Referrer : http://xxxxxxxxx/admincp/attachment.php?do=intro& IP Address : xx.xx.xx.xx Username : Admin Classname : vB_Database_MySQLi MySQL Version : 5.5.39-log
    occurred in file /var/www/html/core/vb/database.php on line 1253
    Trace
    Function halt in file /var/www/html/core/vb/database/mysqli.php line 173
    Function execute_query in file /var/www/html/core/vb/database.php line 519
    Function query_read in file /var/www/html/core/vb/db/result.php line 122
    Function rewind in file /var/www/html/core/vb/db/result.php line 59
    Function __construct in file /var/www/html/core/packages/vbforum/db/mysql/querydefs.php line 7435
    Function searchAttach in file /var/www/html/core/vb/db/query/method.php line 175
    Function execSQL in file /var/www/html/core/vb/db/assertor.php line 282
    Function assertQuery in file /var/www/html/core/vb/db/assertor.php line 599
    Function getRow in file /var/www/html/core/admincp/attachment.php line 793
    Function require_once in file /var/www/html/includes/api/interface/collapsed.php line 118
    Function relay in file /var/www/html/includes/vb5/frontend/controller/relay.php line 29
    Function admincp in file line
    Function call_user_func_array in file /var/www/html/index.php line 72
    Bug?

  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74167

    #2
    Appears so. The attach table doesn't have the required field. It should probably be pulled from the filedata table. Have logged this in JIRA here:
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    Related Topics

    Collapse

    Working...