PDA

View Full Version : SQL search error


tupeu
04-08-2009, 04:21 PM
Hi, i get emails on my server about SQL errors with vBadvanced Links Directory

My server is a VPS running on Fedora 7
I use vBulletin 3.8.2

It seems when a search is done there is an SQL error:

Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT links.linkid
FROM adv_links AS links


WHERE ( MATCH(links.name) AGAINST ('+linux*' IN BOOLEAN MODE) OR MATCH(links.description) AGAINST ('+linux*' IN BOOLEAN MODE) OR MATCH(links.keywords) AGAINST ('+linux*' IN BOOLEAN MODE)) AND links.valid = 1
ORDER BY links.rating ASC LIMIT 500;

MySQL Error : Unknown column 'links.rating' in 'order clause'
Error Number : 1054
Request Date : Wednesday, April 8th 2009 @ 05:46:08 PM
Error Date : Wednesday, April 8th 2009 @ 05:46:09 PM
Script : http://site.com/links/search.php?do=searchresults&string=xxx&catid=0&quicksearch=1&tag=1
Referrer : http://site.com/links/e-learning-5/linuxtracker--328/
IP Address : xx.xxx.xxx.xx
Username : Unregistered
Classname : vB_Database
MySQL Version :

PS I tried to read some similar topics but is seems i don`t have permission:

http://www.vbadvanced.com/forum/showthread.php?t=23824

http://www.vbadvanced.com/forum/showthread.php?t=32052

Brian
04-08-2009, 06:29 PM
Thank you for pointing this out. It looks like there was a small issue that could occur when searching tags if you have your 'Default Links Order' option set to 'Rating'. 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 upload that file to your server over the existing one, that should take care of the issue.