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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2008, 11:23 AM
Spika Spika is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
Default DataBase Error When Searching

I have installed VBA LD without problems and the users can view and add new links, but Today I get two erros:

Code:
Database error in vBulletin 3.7.4:

Invalid SQL:

			SELECT links.linkid
			FROM vb_adv_links AS links
			 LEFT JOIN vb_adv_links_posts AS posts ON (posts.linkid = links.linkid)
			
			WHERE  (links.userid IN(93)) ANDlinks.valid IN(0, 1, 2)
		ORDER BY links.name ASC LIMIT 500;

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 'ANDlinks.valid IN(0, 1, 2)
		ORDER BY links.name ASC LIMIT 500' at line 5 Error Number  : 1064 Request Date  : Monday, December 29th 2008 @ 12:12:19 PM
Error Date    : Monday, December 29th 2008 @ 12:12:19 PM
Script        : http://www.gstrail.es/foro/links/search.php
Referrer      : http://www.gstrail.es/foro/links/search.php
IP Address    : 77.208.27.196
Username      : lawan
Classname     : vB_Database
MySQL Version : 5.0.45
Code:
Database error in vBulletin 3.7.4:

Invalid SQL:

			SELECT links.linkid
			FROM vb_adv_links AS links
			 LEFT JOIN vb_adv_links_posts AS posts ON (posts.linkid = links.linkid)
			
			WHERE  (links.userid IN(93)) ANDlinks.valid IN(0, 1, 2) links.catid IN(1,1,2,3,16,15) AND 
		ORDER BY links.name ASC LIMIT 500;

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 'ANDlinks.valid IN(0, 1, 2) links.catid IN(1,1,2,3,16,15) AND 
		ORDER BY links.n' at line 5
Error Number  : 1064
Request Date  : Monday, December 29th 2008 @ 12:12:09 PM
Error Date    : Monday, December 29th 2008 @ 12:12:09 PM
Script        : http://www.gstrail.es/foro/links/search.php
Referrer      : http://www.gstrail.es/foro/links/search.php
IP Address    : 77.208.27.196
Username      : lawan
Classname     : vB_Database
MySQL Version : 5.0.45
Thanks
Reply With Quote
  #2  
Old 12-29-2008, 12:13 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 32,349
Default

Thank you for pointing this out. I've just updated the links/search.php file in the download package here to include the fix, 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:
    $condition .= 'links.' . ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] ? 'valid IN(0, 1, 2)' 'valid = 1'); 
And replace with this:
PHP Code:
    $condition .= ' links.' . ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] ? 'valid IN(0, 1, 2)' 'valid = 1'); 
(just adding a space between ' and links)
Reply With Quote
  #3  
Old 12-29-2008, 12:55 PM
Spika Spika is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
Default

Thank you very much!
Reply With Quote
  #4  
Old 01-04-2009, 05:58 PM
Spika Spika is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
Default

The fix donīt avoid the error,
Today I have recived two more:
Code:
Database error in vBulletin 3.7.4:

Invalid SQL:

			SELECT links.linkid
			FROM vb_adv_links AS links
			
			
			WHERE (links.name LIKE '%gs %' OR keywords LIKE '%gs %' OR description LIKE '%gs %' AND links.name LIKE '%team %' OR keywords LIKE '%team %' OR description LIKE '%team %') AND  links.valid = 1 links.catid IN(1,1,2,3,16,15) AND 
		ORDER BY links.name ASC LIMIT 500;

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 'links.catid IN(1,1,2,3,16,15) AND 
		ORDER BY links.name ASC LIMIT 500' at line 5 Error Number  : 1064 Request Date  : Sunday, January 4th 2009 @ 06:04:31 PM
Error Date    : Sunday, January 4th 2009 @ 06:04:31 PM
Script        : http://www.gstrail.es/foro/links/search.php
Referrer      : http://www.gstrail.es/foro/links/search.php
IP Address    : 85.56.155.25
Username      : Titan
Classname     : vB_Database
MySQL Version :
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
Database Error When Searching by Username Spika Bugs From 3.1.0 2 01-06-2009 02:00 PM
Links Directory - Database Error When Searching grahamsmythe Bugs From 3.0 RC1 2 08-25-2008 02:26 PM
Error of Keyword searching....V2.0.1 nostalgia Bugs From 2.0.1 5 03-05-2007 03:58 PM
Error message when searching keywords Jester Troubleshooting & Problems 1 12-20-2004 03:48 PM
mysql error when searching advanced teksigns Bugs From 1.0 RC3 7 11-07-2004 11:46 AM


All times are GMT -4. The time now is 03:37 AM.

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.