Announcement

Collapse
No announcement yet.

mysql error // Unknown column 'attachmentid' in 'field list'

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

  • mysql error // Unknown column 'attachmentid' in 'field list'

    our mysql crashed yesterday. after restarting it, we got 2 db errors:
    Can't find file: 'attachmentviews.MYD' (errno: 2)
    Can't find file: 'threadviews.MYD' (errno: 2)

    running "repair/optimizetables" in acp did not worked, so i dropped and recreated the attachmentviews und threadviews tables.


    now i got a new mysql error:

    Database error in vBulletin 3.0.3:

    Invalid SQL: SELECT attachmentid, COUNT(*) AS views FROM attachmentviews GROUP BY attachmentid
    mysql error: Unknown column 'attachmentid' in 'field list'

    mysql error number: 1054

    Date: Friday 24th of December 2004 08:47:45 AM
    Script: http://forum.x.net/admincp/cronadmin...cron&cronid=10
    Referer: http://forum.x.net/admincp/cronadmin...cron&cronid=10
    Username: zoque
    IP Address: 82.82.x.x
    i'd be very thankful for any kind of help.
    // less is more

  • #2
    If I am not mistaken, Errno: 2 means that it can't write the database to a directory. This is a host issue, request your host for a backup.

    Comment


    • #3
      hi floris,

      i got the errno: 2 yesterday, until i recreated the tables for attachmentviews and threadviews.

      the error, that i get now, is "mysql error number: 1054":

      Invalid SQL: SELECT attachmentid, COUNT(*) AS views FROM attachmentviews GROUP BY attachmentid
      mysql error: Unknown column 'attachmentid' in 'field list'
      // less is more

      Comment


      • #4
        Originally posted by cihangir
        hi floris,

        i got the errno: 2 yesterday, until i recreated the tables for attachmentviews and threadviews.

        the error, that i get now, is "mysql error number: 1054":

        Invalid SQL: SELECT attachmentid, COUNT(*) AS views FROM attachmentviews GROUP BY attachmentid
        mysql error: Unknown column 'attachmentid' in 'field list'
        As you manually added the tables back, I think you added it wrong or are missing something. I suggest to restore it from a backup.

        Comment


        • #5
          System error: 2 = No such file or directory

          To fix these immediate errors, run these queries to recreate these tables (assuming you have no table prefix):

          DROP TABLE IF EXISTS attachmentviews;
          CREATE TABLE attachmentviews (
          attachmentid INT UNSIGNED NOT NULL DEFAULT '0',
          KEY postid (attachmentid)
          );


          DROP TABLE IF EXISTS threadviews;
          CREATE TABLE threadviews (
          threadid INT UNSIGNED NOT NULL DEFAULT '0',
          KEY threadid (threadid)
          );
          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

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