vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Links Directory > vBa Links Directory v3.0 Support > Bugs & Issues > Bugs From 3.0 Beta 2

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2008, 10:46 AM
BWJ BWJ is offline
Senior Member
 
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 
Reply With Quote
  #2  
Old 05-31-2008, 03:47 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
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
Reply With Quote
  #3  
Old 05-31-2008, 07:38 PM
BWJ BWJ is offline
Senior Member
 
Join Date: Jul 2005
Posts: 120
Default Re: search error

Works now! Thank you....
Reply With Quote
  #4  
Old 06-02-2008, 02:15 PM
surfdude surfdude is offline
Member
 
Join Date: Feb 2004
Location: London, UK
Posts: 51
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.
Reply With Quote
  #5  
Old 06-02-2008, 02:36 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
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 .= '(';
            } 
Reply With Quote
  #6  
Old 06-02-2008, 04:18 PM
surfdude surfdude is offline
Member
 
Join Date: Feb 2004
Location: London, UK
Posts: 51
Default Re: search error

That worked.

Quote:
Your forum is currently using the vBulletin search engine.

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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Error On VB 3.7 snerd Troubleshooting & Problems 0 01-31-2008 08:43 PM
Search Error tfw2005 Bugs From 1.0 RC2 1 09-09-2007 01:25 PM
Search SQL Error ManagerJosh Bugs From 1.0 RC1 17 08-25-2007 12:57 PM
Search Error absolutepunknet Troubleshooting & Problems 0 03-22-2006 05:06 PM


All times are GMT -4. The time now is 04:57 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.