Web-Site Error!!!

Associate
Joined
6 May 2010
Posts
1,003
Location
Nottingham, UK
Hi Guys,

I wonder if you could help me I have built a web-site using Nuke Evolution Xtreme
and on the homepage there is a block for the last 6 posts on the forum that get
put into this block but the block is not updating and I am getting the error
message below in my admin logs. If anyone could help me out I would be grateful.

URL: /modules.php?name=Forums

File: /home/My Domain/public_html/modules/Forums/glance.php
Line: 97
Message: 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 ')
AND t.forum_id = f.forum_id
AND p.post_id = t.' at line 9
Code: 1064
Query:
SELECT
f.forum_id, f.forum_name, t.topic_title, t.topic_id, t.topic_last_post_id, t.topic_poster, t.topic_views, t.topic_replies, t.topic_type, t.topic_status,
p2.post_time, p2.poster_id, p2.post_username, p.post_username,

u.username as last_username,
u2.username as author_username
FROM nuke_bbforums f, nuke_bbposts p, nuke_bbtopics t, nuke_bbposts p2, nuke_users u, nuke_users u2
WHERE
f.forum_id IN ()
AND t.forum_id = f.forum_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND t.topic_moved_id = 0
AND p2.poster_id = u.user_id
AND t.topic_poster = u2.user_id
ORDER BY t.topic_glance_priority DESC, t.topic_last_post_id DESC LIMIT 6
 
There's nothing obviously wrong with your SQL, although without seeing your schema it's impossible to say for sure.

Have you added/removed some tables recently? Messed around in phpMyAdmin at all?
 
There's nothing obviously wrong with your SQL, although without seeing your schema it's impossible to say for sure.

Have you added/removed some tables recently? Messed around in phpMyAdmin at all?

Hi Spunky thanks for your reply.

The only thing I have done lately on Myphpadmin was import an sql file for a
Ventrilo block on the site but the problem was there before I did that anyway,
so im pretty sure its not that.

Apart from that no tables or anything have been touched.
 
Sorry, just realised I'm being blind - you have an empty IN() statement:

WHERE
f.forum_id IN ()
AND t.forum_id = f.forum_id

There should be a list of values between the brackets.
 
Sorry, just realised I'm being blind - you have an empty IN() statement:

WHERE
f.forum_id IN ()
AND t.forum_id = f.forum_id

There should be a list of values between the brackets.

That's funny m8, because when i looked back through the error that i just
posted i noticed it as well, I have added what is needed and the block is working
fine now lol. Feel like such a dumb ass lol.

Thanks for the help buddy
 
Back
Top Bottom