Database error: Error Number : 1054

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • L-Mane
    Senior Member
    • Sep 2002
    • 286
    • 3.6.x

    [Forum] Database error: Error Number : 1054

    Getting the below error when I goto usercp. I have uninstalled plugins, disabled plugins, repaired database, and I am still getting the error. Not sure what I
    should do next. Have Googled this but have not found any solutions.


    Code:
    Database error in vBulletin 4.2.0:
    Invalid SQL:
      SELECT reputation.userid, SUM(reputation.reputation) AS totalrep
      FROM reputation AS reputation
      GROUP BY reputation.userid;
    MySQL Error   : Unknown column 'reputation.reputation' in 'field list'
    Error Number  : 1054
    MySQL Version : 5.1.62-cll
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    And do you see a field called reputation in your reputation table?

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • L-Mane
      Senior Member
      • Sep 2002
      • 286
      • 3.6.x

      #3
      No, there isn't a field there. Do I need to create it?

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        Well, it should be there and has been there since the beginning. You may add the field by getting the requirements from the /install/mysql-schema.php file.
        Code:
        reputation INT NOT NULL DEFAULT '0'

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help

        Comment

        • L-Mane
          Senior Member
          • Sep 2002
          • 286
          • 3.6.x

          #5
          I tried that in phpmyadmin and I got an error. Then used the method you mentioned and got.

          MySQL Schema: $db is not an instance of the vB Database class.
          This script requires the escape_string() method from the vB Database class.

          BTW, using latest VB.

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            You don't run the mysql-schema.php file. I was just pointing out that the necessary information to add the field to your table is in that file. You can add it manually in phpMyAdmin > click on Database > click on reputation table > Structure > click the Go button where it says Add 1 field(s) and then enter that information in the appropriate fields:
            Click image for larger version

Name:	Screen Shot 2012-06-01 at 10.19.44 AM.png
Views:	1
Size:	10.9 KB
ID:	3687437

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools <- awesome site for html/css help

            Comment

            • L-Mane
              Senior Member
              • Sep 2002
              • 286
              • 3.6.x

              #7
              Ah I see! Silly me lol. Let me try that. Thank you Lynne!

              Comment

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