Database error 7.0.3

I am getting a DB error all of the sudden. Happens when a visitor tries to view some profiles. Only some profiles are like this. Any ideas?

Database error in Geocaching Atlantic

Query:

SELECT p.*, if(`DateLastNav` > SUBDATE(NOW( ), INTERVAL 1 MINUTE ), 1, 0) AS `is_online`, UNIX_TIMESTAMP(p.`DateLastLogin`) AS 'TS_DateLastLogin', UNIX_TIMESTAMP(p.`DateReg`) AS 'TS_DateReg'
FROM `Profiles` AS p

INNER JOIN (SELECT IF( '18' = f.`ID` , f.`Profile` , f.`ID` ) AS `ID`
FROM `sys_friend_list` AS `f`
WHERE 1 AND (f.`Profile` = '18' OR f.`ID` = '18') AND `Check` = 1) AS `f` ON (`f`.`ID` = `p`.`ID`)

ORDER BY p.`Avatar` DESC
LIMIT 0,

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 '' at line 9

Found error in the file '/home/blog2504/public_html/geocachingatlantic.ca/inc/profiles.inc.php' at line 388.
Called 'db_res' function with erroneous argument #0.

Quote · 8 Oct 2010

Hello,

try to disable the db cache (advanced settings->other). Then empty the cache.

Let we know.

See my products at http://www.boonex.com/market/posts/ilbellodelweb | Hosting: zarconia.net
Quote · 9 Oct 2010

 

Hello,

try to disable the db cache (advanced settings->other). Then empty the cache.

Let we know.

Tried this but still same problem.

Quote · 9 Oct 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.