Announcement

Collapse
No announcement yet.

Error with Annnouncements

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

  • Error with Annnouncements

    When I post a forum wide announcement I'm getting the following error when it is viewed:

    PHP Code:
      Database error in vBulletin 3.0.0:
    Invalid SQL
     
    SELECT announcementidstartdateenddateannouncement.titlepagetextallowhtmlallowbbcodeallowsmiliesviews,
     
    user.*, userfield.*, usertextfield.*,
     IF(
    displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupid
     
    ,avatar.avatarpathNOT ISNULL(customavatar.avatardata) AS hascustomavatarcustomavatar.dateline AS avatardateline
     
    level
     FROM  announcement 
    AS announcement
     LEFT JOIN user 
    AS user ON(user.userid=announcement.userid)
     
    LEFT JOIN userfield AS userfield ON(userfield.userid=announcement.userid)
     
    LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid=announcement.userid)
     
    LEFT JOIN avatar AS avatar ON(avatar.avatarid=user.avatarid)
     
    LEFT JOIN customavatar AS customavatar ON(customavatar.userid=announcement.userid)
     
    LEFT JOIN reputationlevel AS reputationlevel ON(user.reputationlevelid=reputationlevel.reputationlevelid)
     
      
    WHERE startdate <= 1085508451
       
    AND enddate >= 1085508451
       
    AND announcement.forumid IN (40,33,-1)
      
    ORDER BY startdate DESC
     
    mysql error
    Column'views' in field list is ambiguous
    mysql error number
    1052
    Date
    Tuesday 25th of May 2004 02:07:32 PM
    Script
    http://www.powwows.com/gathering/announcement.php?f=40
    Refererhttp://www.powwows.com/gathering/forumdisplay.php?f=40
    UsernamePaul G
    IP Address
    167.7.37.120 
    PowWows.com

  • #2
    First thing to try is to reupload the original announcement.php file from the vB zip file. Make sure you upload in ASCII and overwrite the one on the server.

    If you still have this problem after that, then reupload the original vbulletin-style.xml file from the zip file to your install directory. Make sure you upload this in ASCII and overwrite the one on the server. Then import this file in the 'Upload' section of the Style Manager.

    Next create a new style and choose no parent style. This will force it to use the default templates. Then change to this style and view your forums with it. Do you have the same problem?
    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


    • #3
      An ambiguous field means at least two of the joined tables in the query have that same field name. I just checked all of the tables in that query and only the announcement table has a views field.

      Have you made any modifications to the vBulletin database tables?

      Comment


      • #4
        Check the user table, it seems to be common for customers to have added a views field to this table. Remove or rename it if you have.

        Comment


        • #5
          Originally posted by Freddie Bingham
          Check the user table, it seems to be common for customers to have added a views field to this table. Remove or rename it if you have.
          Yep, I had a field named views in that table!! I renamed it and all is good.

          Now I just have to find why I have that field!!!
          PowWows.com

          Comment

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