Results 1 to 4 of 4

Thread: Search by user name database error.

  1. #1
    Join Date
    Jan 2004
    Posts
    820

    Default Search by user name database error.

    If I go to search and do a search just by user name I get a database error every time.

    Invalid SQL:

    SELECT links.linkid
    FROM adv_links AS links


    WHERE ) AND (links.userid IN(8)) AND valid = 1
    LIMIT 10000;

    MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (links.userid IN(8)) AND valid = 1
    LIMIT 10000' at line 5
    Error Number : 1064
    Request Date : Tuesday, July 8th 2008 @ 12:25:32 AM
    Error Date : Tuesday, July 8th 2008 @ 12:25:32 AM
    Script : http://www.****.net/forum/links/search.php
    Referrer : http://www.****.net/forum/links/search.php
    IP Address : 74.75.195.47
    Username : attroll
    Classname : vB_Database
    MySQL Version : 4.1.22-standard

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

    Default Re: Search by user name database error.

    Thank you for pointing this out. I've just applied the fix to the links/search.php file here, so if you will download the files again and replace that file on your server with the updated version, that should take care of the problem.
    Or if you would rather apply the fix manually, just look in the file for this line:
    PHP Code:
        $condition .= ') AND '
    And replace with this:
    PHP Code:
        if ($condition)
        {
            
    $condition .= ') AND ';
        } 

  3. #3
    Join Date
    Jan 2004
    Posts
    820

    Default Re: Search by user name database error.

    Brian

    I search my /links/search.php file for the following line and there is no line like that.

    Code:
    $condition .= ') AND ';

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

    Default Re: Search by user name database error.

    The files can still be downloaded from here if yours does not contain that code.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Today Post, New Post & Search Database Errors
    By ericpsf in forum Troubleshooting & Problems
    Replies: 5
    Last Post: 07-18-2008, 12:22 AM
  2. User search module
    By Vizionz in forum Module & Modification Discussion & Requests
    Replies: 8
    Last Post: 12-20-2006, 03:51 PM
  3. Database Error... did a search, found no answer
    By CHiLL in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 07-30-2006, 10:10 AM
  4. Search box that searches forums and links database?
    By GamingVidz.com in forum "How Do I..." Questions
    Replies: 1
    Last Post: 01-20-2006, 01:09 AM

Posting Permissions

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