Thanks Brad for marking this unresolved. I searched how to do this myself, but I guess it's not an option... but should be. :-)
Anyway... this is exactly what is printed to the screen after a search that returns no result. There appears to be no mysql error number:
SELECT f_id, f_title, f_author, f_replies, f_active, f_pinned, user_firstname, user_lastname FROM forum LEFT JOIN users ON forum.f_author=users.user_id WHERE f_id IN ( SELECT IF(f_parentid = 0, f_id, f_parentid) FROM forum WHERE f_title LIKE '%notgonnafindthis%' OR f_message LIKE '%notgonnafindthis%' ) ORDER BY f_pinned DESC, f_active DESC 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
Cleaned Up(similar to how it's written in my pages source code):
SELECT
f_id, f_title,
f_author,
f_replies,
f_active,
f_pinned,
user_firstname,
user_lastname
FROM
forum
LEFT JOIN
users
ON
forum.f_author=users.user_id
WHERE
f_id IN
(
SELECT
IF(f_parentid = 0, f_id, f_parentid)
FROM
forum
WHERE
f_title LIKE '%notgonnafindthis%'
OR
f_message LIKE '%notgonnafindthis%'
)
ORDER BY
f_pinned DESC,
f_active DESC
(Produces:)
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