Results 1 to 5 of 5

Thread: Invalid SQL When Searching By Username

  1. #1
    Join Date
    Apr 2008
    Posts
    6

    Default Invalid SQL When Searching By Username

    Getting this occasionally:

    Database error in vBulletin 3.7.3:

    Invalid SQL:

    SELECT links.linkid
    FROM adv_links AS links


    WHERE (links.userid IN(2965,3459) OR posts.userid IN(2965,3459)) AND links.dateline >=1215362987 AND valid = 1
    ORDER BY links.name ASC LIMIT 500;

    MySQL Error : Unknown table 'posts' in where clause
    Error Number : 1109
    Request Date : Saturday, October 4th 2008 @ 12:49:47 PM
    Error Date : Saturday, October 4th 2008 @ 12:49:47 PM
    Script : http://www.penturners.org/links/search.php
    Referrer : http://www.penturners.org/links/search.php
    IP Address : 71.111.79.242
    Username : SuperDave
    Classname : vb_database

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

    Default

    Thank you for pointing this out. I've just applied the fix for this to the links/search.php file in the download package here, so if you will download the files again and replace that file on your server with the updated version, that should put a stop to the SQL errors.

  3. #3
    Join Date
    Apr 2008
    Posts
    6

    Default

    The database error is gone, but I don't this the behavior of the script is correct.

    When searching for exact user name, it returns all usernames containing that string. See images.

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

    Default

    Not sure how that code got removed, but thank you for pointing that out. I've just updated the links/search.php file in the download package to correct the username issue as well, so if you will download the files from here and update that file on your server one more time, that should take care of that issue as well.

  5. #5
    Join Date
    Apr 2008
    Posts
    6

    Default

    And a further problem...

    Database error in vBulletin 3.7.3:

    Invalid SQL:

    SELECT links.linkid
    FROM adv_links AS links
    LEFT JOIN adv_links_posts AS posts ON (posts.linkid = links.linkid)

    WHERE (links.userid IN(4168)) AND valid = 1
    ORDER BY categories.title ASC LIMIT 500;

    MySQL Error : Unknown table 'categories' in order clause
    Error Number : 1109
    Request Date : Friday, October 24th 2008 @ 03:48:16 PM
    Error Date : Friday, October 24th 2008 @ 03:48:17 PM
    Script : http://www.penturners.org/links/search.php
    Referrer : http://www.penturners.org/links/search.php
    IP Address : 66.125.190.130
    Username : Vince_Hoffmann
    Classname : vb_database
    MySQL Version :

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Passing username within a module as $bbuserinfo[username]
    By theMusicMan in forum Module & Modification Discussion & Requests
    Replies: 5
    Last Post: 03-12-2013, 04:46 PM
  2. Searching only CMPS content?
    By WebmasterVSH in forum "How Do I..." Questions
    Replies: 4
    Last Post: 09-04-2008, 09:27 AM
  3. searching subcategories
    By Grae in forum Bugs From 2.0.0
    Replies: 0
    Last Post: 01-05-2007, 04:38 PM
  4. after hours of searching
    By raven3d in forum "How Do I..." Questions
    Replies: 4
    Last Post: 12-13-2005, 04:07 AM
  5. Searching
    By chrisvonc in forum Pre-Sale Questions
    Replies: 5
    Last Post: 07-17-2004, 11:58 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
  •