Results 1 to 4 of 4

Thread: sql error: Column 'catid' in where clause is ambiguous

  1. #1
    Join Date
    Apr 2004
    Posts
    18

    Default sql error: Column 'catid' in where clause is ambiguous

    Database error in vBulletin 3.7.3:

    Invalid SQL:

    SELECT links.linkid
    FROM adv_links AS links
    LEFT JOIN adv_links_categories AS categories ON (links.catid = categories.catid)
    WHERE links.valid = 1
    AND catid = 2 AND links.userid = 11630
    ORDER BY categories.title ASC;

    MySQL Error : Column 'catid' in where clause is ambiguous
    Error Number : 1052
    Request Date : Wednesday, October 15th 2008 @ 04:58:12 AM
    Error Date : Wednesday, October 15th 2008 @ 04:58:12 AM
    Script : http://www.vvv.com/links/showlink.ph...nkuserid=11630
    Referrer :
    IP Address : 38.98.xxx.xx
    Username : Unregistered
    Classname : vB_Database
    MySQL Version :

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Thank you for pointing this out. I've went ahead and applied the fix to the forum/includes/vba_links_plugin_sf.php file in the download package here, so if you will download the files again and update that one on your server, that should take care of the issue.
    Or if you would rather apply the fix manually, just look in the file for this line:
    PHP Code:
    $linkquery 'AND catid = ' $catid
    And replace with this:
    PHP Code:
    $linkquery 'AND links.catid = ' $catid
    Last edited by Brian; 10-20-2008 at 11:34 AM.

  3. #3
    Join Date
    Apr 2004
    Posts
    18

    Default

    $linkquery = 'AND links.catid = ' . $catid;

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Thanks... I think my copy/paste buttons are acting up.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. double catid on sort links
    By briansol in forum Troubleshooting & Problems
    Replies: 0
    Last Post: 09-12-2008, 02:12 AM
  2. Get $cats[catid] into adv_dyna template
    By stitch in forum "How Do I..." Questions
    Replies: 3
    Last Post: 05-12-2008, 03:56 PM
  3. Unknown column 'links.rating' in 'order clause'
    By Shelby in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 01-09-2007, 06:01 PM
  4. MySQL Error: 1052 : Column 'dateline' in order clause is ambiguous
    By Bailx in forum Troubleshooting & Problems
    Replies: 8
    Last Post: 08-23-2006, 04:55 PM
  5. Column 'iconid' in from clause is ambiguous
    By stitch in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 11-16-2005, 05:44 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
  •