Announcement

Collapse
No announcement yet.

recreating visitormessage table

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

  • recreating visitormessage table

    hello,

    my server crashed the other day, so i've been in the process of restoring my database. some of the fields in the database were not restored, so i need to recreate them. below for instance is an error message i get when i go to a members profile page -- the visitormessage table is missing.

    can i simply recreate the visitormessage table via phpmyadmin? if so, how many fields should that table have?

    thanks
    simit

    ****

    Database error in vBulletin 3.8.1:

    Invalid SQL:

    SELECT SQL_CALC_FOUND_ROWS
    visitormessage.*, user.*, visitormessage.ipaddress AS messageipaddress
    ,IF(userlist.userid IS NOT NULL, 1, 0) AS bbuser_iscontact_of_user
    ,deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
    ,avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb, filedata_thumb, NOT ISNULL(customavatar.userid) AS hascustom

    FROM visitormessage AS visitormessage
    LEFT JOIN user AS user ON (visitormessage.postuserid = user.userid)
    LEFT JOIN userlist AS userlist ON (userlist.userid = user.userid AND userlist.type = 'buddy' AND userlist.relationid = 509)
    LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
    LEFT JOIN deletionlog AS deletionlog ON (visitormessage.vmid = deletionlog.primaryid AND deletionlog.type = 'visitormessage')

    WHERE visitormessage.userid = 3875
    AND (visitormessage.state IN ('visible','moderation','deleted'))


    ORDER BY visitormessage.dateline DESC
    LIMIT 0, 10;

    MySQL Error : Table 'informed_test.visitormessage' doesn't exist
    Error Number : 1146
    Request Date : Saturday, November 7th 2009 @ 08:44:10 AM
    Error Date : Saturday, November 7th 2009 @ 08:44:10 AM
    Script : http://www.informedtrades.com/member...getinfo&u=3875
    Referrer :
    IP Address : 207.244.166.181
    Username : Simit Patel
    Classname : vB_Database
    MySQL Version : 5.0.81-community
    A revenue-sharing guitar learning community. Learn with us, and earn with us!

  • #2
    Here's the query from the 3.8.1 install:

    Code:
    CREATE TABLE TABLE_PREFIX.visitormessage (
      vmid INT UNSIGNED NOT NULL auto_increment,
     userid INT UNSIGNED NOT NULL DEFAULT '0',
     postuserid INT UNSIGNED NOT NULL DEFAULT '0',
     postusername VARCHAR(100) NOT NULL DEFAULT '',
     dateline INT UNSIGNED NOT NULL DEFAULT '0',
     state ENUM('visible','moderation','deleted') NOT NULL default 'visible',
     title VARCHAR(255) NOT NULL DEFAULT '',
     pagetext MEDIUMTEXT,
     ipaddress INT UNSIGNED NOT NULL DEFAULT '0',
     allowsmilie SMALLINT UNSIGNED NOT NULL DEFAULT '0',
     reportthreadid INT UNSIGNED NOT NULL DEFAULT '0',
     messageread SMALLINT UNSIGNED NOT NULL DEFAULT '0',
      PRIMARY KEY (vmid),
     KEY postuserid (postuserid, userid, state),
     KEY userid (userid, dateline, state)
    )
    Remember to change the TABLE_PREFIX value to whatever the prefix you use is.
    Vote for:

    - *Admin Settable Paid Subscription Reminder Timeframe*
    -
    *PM - Add ability to reply to originator only*
    - Add Admin ability to auto-subscribe users to specific channel(s)
    - Highlight the correct navigation tab when you are on a custom page
    - "Quick Route" Interface...
    - Allow to use custom icons for individual forums

    Comment

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