Results 1 to 12 of 12

Thread: Error after upgrading mysql from 5.0.x to 5.015 final

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    6

    Default Error after upgrading mysql from 5.0.x to 5.015 final

    Problem only arrises in the vbadvanced pages, not in the forums themselves, and ONLY when the NEWS module is enabled AND the news thread icons are enabled. If I disable them, the problem is gone (Logical ofcoarse, cause the error is about them )
    Database error in vBulletin 3.5.0:

    Invalid SQL:

    SELECT IF(votenum >= 1, votenum, 0) AS numbvote, IF(votenum >= 1 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
    thread.threadid, post.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext, allowsmilie, forum.title AS forumtitle

    ,thread.iconid AS threadiconid, iconpath AS threadiconpath

    , NOT ISNULL(subscribethread.subscribethreadid) AS subscribed
    FROM thread AS thread
    LEFT JOIN forum AS forum USING (forumid)
    LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
    LEFT JOIN icon USING (iconid)



    LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = '1')
    LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
    WHERE thread.threadid IN(1111,1091,1081,1070,1065,1058)

    GROUP BY post.postid
    ORDER BY postdateline DESC
    LIMIT 6;

    MySQL Error : Column 'iconid' in from clause is ambiguous
    Error Number : 1052
    Date : Tuesday, October 25th 2005 @ 04:19:12 PM
    Script : http://xxx.xxxxx.xx/default.php
    Referrer :
    IP Address : xx.xxx.xxx.xxx
    Username : Sickboy
    Classname : vB_Database_MySQLi
    Last edited by Sickboy; 10-25-2005 at 10:40 AM.

  2. #2

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    In modules/latesttopics.php and modules/news.php find the following:
    Code:
    LEFT JOIN ' . TABLE_PREFIX . 'icon USING (iconid)
    and replace it with:

    Code:
    LEFT JOIN ' . TABLE_PREFIX . 'icon AS icon ON (icon.iconid = thread.iconid)
    It should work as expected again after that.

    Regards,
    Ralf

  3. #3
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,460

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    I wouldn't *think* that changing that would have anything to do with the error. If it does help though please let me know.

  4. #4
    Junior Member
    Join Date
    Mar 2005
    Posts
    6

    Lightbulb Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Ralf... major thanks!!
    Works perfectly.

    Thanks again.

  5. #5
    Super Moderator Zachery's Avatar
    Join Date
    Jan 2004
    Posts
    3,186

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Try disabling strict mode if you continue having problems.
    Zachery
    I may or may not do things.

  6. #6
    Junior Member
    Join Date
    Mar 2005
    Posts
    6

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Quote Originally Posted by Zachery
    Try disabling strict mode if you continue having problems.
    Ofcoarse I already tried that before contacting you guys here on the forums

    The solution above worked for me, I only came to find out that I either need new thread icons or leave em disabled; it's nicer for now

  7. #7
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,460

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    *Moves to bugs forum to make sure this is changed in the next version.*

  8. #8

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Ok. I tried the fix above as well as disabling strict mode and I am still getting the error. This is on a "virgin" new install of vB 3.5.3 and vBA CMPS 2.0.0.

    Any other ideas?

  9. #9
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,460

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Did you apply the changes to your news.php and latesttopics.php files?

  10. #10

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    bah! had a stray character in news.php. it's working now. thanks!

  11. #11

    Default Re: Error after upgrading mysql from 5.0.x to 5.015 final

    Quote Originally Posted by Ralf vd Enden View Post
    In modules/latesttopics.php and modules/news.php find the following:
    Code:
    LEFT JOIN ' . TABLE_PREFIX . 'icon USING (iconid)
    and replace it with:

    Code:
    LEFT JOIN ' . TABLE_PREFIX . 'icon AS icon ON (icon.iconid = thread.iconid)
    It should work as expected again after that.

    Regards,
    Ralf
    That worked great for me!

    Thanks!

  12. #12
    Huntsville Car Scene.com
    Join Date
    Sep 2004
    Location
    HSV
    Posts
    276

    Default

    I hate to bump an old thread, but I just disabled the News Icon and it worked for me. I'll change the code later. I'm just happy to see it working again since I'm running older versions of vb and the cmps on mysql 5.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL error
    By Wrestling-Freek in forum Troubleshooting / "How do I..." Questions
    Replies: 10
    Last Post: 04-19-2005, 01:16 PM
  2. MYSQL Error
    By laeth in forum Troubleshooting / "How do I..." Questions
    Replies: 4
    Last Post: 04-18-2005, 08:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •