PDA


View Full Version : ORDER BY links.name ASC db error


diettalk
08-09-2008, 11:30 AM
vBa Links v3.0 RC1


Database error in vBulletin 3.7.2:

Invalid SQL:

SELECT links.linkid
FROM adv_links AS links

WHERE links.valid = 1
AND catid =
ORDER BY links.name ASC;

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 'ORDER BY links.name ASC' at line 6
Error Number : 1064
Request Date : Friday, August 8th 2008 @ 04:57:34 AM
Error Date : Friday, August 8th 2008 @ 04:57:34 AM
Script : http://www.www.com/links/showlink.php?do=showdetails&l=94&goto=next&catid=
Referrer :

Brian
08-11-2008, 03:38 PM
Thank you for pointing this out. Looks like that error can be generated when trying to click the "Next Link" text on a link that's been deleted... Not entirely sure how you would have done that, but you can correct the issue by looking in your forum/includes/vba_links_plugin_sf.php file for this line:
$checkcat = $db->query_first("SELECT catid FROM " . TABLE_PREFIX . "adv_links WHERE linkid = $linkid");

And adding this just below it:
if (empty($checkcat))
{
define('SF_ERROR', 'nolinkid');
}

diettalk
08-12-2008, 02:10 PM
Fixed. Thanks... Some how I have users who found it... LOL