Results 1 to 6 of 6

Thread: search error

  1. #1
    Join Date
    Jul 2005
    Posts
    120

    Default search error

    When performing a search with either single or multiple selection menu it gives following error:

    PHP Code:
    Database error in vBulletin 3.7.1:

    Invalid SQL:

                
    SELECT links.linkid
                FROM forumadv_links 
    AS links
                
                LEFT JOIN forumadv_links_cfields_entries 
    AS customfields ON (links.linkid customfields.lid)
                
    WHERE (field15 IN('234234') AND ) AND  valid 1
            LIMIT 500
    ;

    MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near ') AND  valid = 1
            LIMIT 500' 
    at line 5
    Error Number  
    1064 

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

    Default Re: search error

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

  3. #3
    Join Date
    Jul 2005
    Posts
    120

    Default Re: search error

    Works now! Thank you....

  4. #4
    Join Date
    Feb 2004
    Location
    London, UK
    Posts
    54

    Default Re: search error

    This did not fix my problem since I have same message as one in the first post. I have first made manual changes to searc.php as suggested and have then downloaded lates package and still no joy.

    This is the message I receive:

    PHP Code:
    Database error in vBulletin 3.7.0:

    Invalid SQL:

                
    SELECT links.linkid
                FROM adv_links 
    AS links
                
                
                WHERE links
    .name LIKE '% errant  %' OR keywords LIKE '% errant  %' OR description LIKE '% errant  %') AND  valid 1
            LIMIT 500
    ;

    MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near ') AND  valid = 1
            LIMIT 500' 
    at line 5
    Error Number  
    1064
    Request Date  
    MondayJune 2nd 2008 01:11:48 PM
    Error Date    
    MondayJune 2nd 2008 01:11:48 PM
    Script        
    http://www.xxxxxxxxxxxx.co.uk/links/search.php
    Referrer      http://www.xxxxxxxxxxxx.co.uk/links/search.php
    IP Address    xx.xxx.xxx.xxx
    Username      
    xxxxxxxxxx
    Classname     
    vb_database
    MySQL Version 
    4.1.20 
    Last edited by surfdude; 06-02-2008 at 02:18 PM.

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

    Default Re: search error

    Thanks for pointing this one out as well. Looks like there's a small issue that can occur if you have full text searching disabled in your vB options. I've just applied the fix to the links/search.php file in the download package here, so if you will download the files again and upload the updated version over your current one, 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:
                foreach ($searchwords AS $sstring
    And Add this just Above:
    PHP Code:
                if (!$vbulletin->options['fulltextsearch'])
                {
                    
    $condition .= '(';
                } 

  6. #6
    Join Date
    Feb 2004
    Location
    London, UK
    Posts
    54

    Default Re: search error

    That worked.

    Your forum is currently using the vBulletin search engine.

    To enable the MySQL Fulltext search, we will issue the following two queries...
    Thank you.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search Error On VB 3.7
    By snerd in forum Troubleshooting & Problems
    Replies: 0
    Last Post: 01-31-2008, 08:43 PM
  2. Search Error
    By tfw2005 in forum Bugs From 1.0 RC2
    Replies: 1
    Last Post: 09-09-2007, 01:25 PM
  3. Search SQL Error
    By ManagerJosh in forum Bugs From 1.0 RC1
    Replies: 17
    Last Post: 08-25-2007, 12:57 PM
  4. Search Error
    By absolutepunknet in forum Troubleshooting & Problems
    Replies: 0
    Last Post: 03-22-2006, 05:06 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
  •