Error during the database search in the Forum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shiraz sat
    Member
    • Jun 2009
    • 52
    • 3.8.x

    [Forum] Error during the database search in the Forum

    Hello
    I think when I search the forum I am faced with a database error. Please help
    Code:
    Database error in vBulletin 4.1.12:
    
    Invalid SQL:
    
                SELECT searchlog.*
                FROM searchlog AS searchlog
                WHERE searchhash = '4d0cdeebd22bc5e6152610cc9f44cff2' AND
                    sortby =  'defaultdateline' AND
                    sortorder =  'desc' AND
                    dateline > 1336053333 AND
                    userid = 2 AND
                    completed = 1
                ORDER BY dateline DESC
                LIMIT 1;
    
    MySQL Error   : Table 'dvbshare_db4fyou.searchlog' doesn't exist
    Error Number  : 1146
    Request Date  : Thursday, May 3rd 2012 @ 04:55:33 PM
    Error Date    : Thursday, May 3rd 2012 @ 04:55:39 PM
    Script        : http://*******/search.php?do=process
    Referrer      : http://******/index.php
    IP Address    : 188.245.148.113
    Username      : *******
    Classname     : vB_Database
    MySQL Version : 5.1.62-cll
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    If you look at your database, do you see the table searchlog?

    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

    • shiraz sat
      Member
      • Jun 2009
      • 52
      • 3.8.x

      #3
      Originally posted by Lynne
      If you look at your database, do you see the table searchlog?
      No - there is no

      Comment

      • borbole
        Senior Member
        • Feb 2010
        • 3074
        • 4.0.0

        #4
        Originally posted by shiraz sat
        No - there is no
        Try to readd it. That should fix the error.

        Comment

        • Lynne
          Former vBulletin Support
          • Oct 2004
          • 26255

          #5
          The schema for the table is in the /install/mysql-schema.php file.

          Code:
          CREATE TABLE searchlog (
              searchlogid INT UNSIGNED NOT NULL AUTO_INCREMENT,
              userid INT UNSIGNED NOT NULL DEFAULT '0',
              ipaddress VARCHAR(15) NOT NULL DEFAULT '',
              searchhash VARCHAR(32) NOT NULL,
              sortby VARCHAR(15) NOT NULL DEFAULT '',
              sortorder ENUM('asc','desc') NOT NULL DEFAULT 'asc',
              searchtime FLOAT UNSIGNED NOT NULL DEFAULT '0',
              dateline INT UNSIGNED NOT NULL DEFAULT '0',
              completed SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              criteria MEDIUMTEXT NOT NULL,
              results MEDIUMBLOB,
              PRIMARY KEY (searchlogid),
              KEY search (userid, searchhash, sortby, sortorder),
              KEY userfloodcheck (userid, dateline),
              KEY ipfloodcheck (ipaddress, dateline)
          )

          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

          • shiraz sat
            Member
            • Jun 2009
            • 52
            • 3.8.x

            #6
            Please show the photo. I am a beginner

            Comment

            • borbole
              Senior Member
              • Feb 2010
              • 3074
              • 4.0.0

              #7
              Originally posted by shiraz sat
              Please show the photo. I am a beginner
              What photo do you mean?

              The query posted above should be run either at the SQL Box at your forum 's database phpmyadmin. Or you can also run it from your Admin Panel->Maintenance->Execute SQL Query. But for this you must enter your user id at the below area at the config.php file:

              PHP Code:
              $config['SpecialUsers']['canrunqueries'] = 'x'
              Where x equals your user id.

              Comment

              • shiraz sat
                Member
                • Jun 2009
                • 52
                • 3.8.x

                #8
                Originally posted by borbole
                What photo do you mean?

                The query posted above should be run either at the SQL Box at your forum 's database phpmyadmin. Or you can also run it from your Admin Panel->Maintenance->Execute SQL Query. But for this you must enter your user id at the below area at the config.php file:

                PHP Code:
                $config['SpecialUsers']['canrunqueries'] = 'x'
                Where x equals your user id.
                Please notice that your picture will

                Comment

                • Lynne
                  Former vBulletin Support
                  • Oct 2004
                  • 26255

                  #9
                  You need to run that query I posted. If you have phpMyAdmin, you may run it using that.

                  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

                  • borbole
                    Senior Member
                    • Feb 2010
                    • 3074
                    • 4.0.0

                    #10
                    Originally posted by shiraz sat
                    Please notice that your picture will
                    I am sorry, you lost me here. Don''t have a clue what you mean.

                    Comment

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