OK, if I stop using the "SET NAMES" command, everything works perfectly with only regular rights. So I can have my ubblisa account work just like Gizmo does, as long as I don't try to use SET NAMES. Unfortunately a key purpose of this project was to be able to use SET NAMES smile.

When I run just the line in question with SET NAMES, in my test script, it works fine -

Code
SELECT	COUNT(p.POST_ID) AS POSTS, SUM(p.POST_IS_TOPIC) AS TOPICS, t.FORUM_ID
FROM	ubbt_POSTS as p,
	ubbt_TOPICS as t
	WHERE	(t.TOPIC_ID = p.TOPIC_ID) AND p.POST_IS_APPROVED = 1
	AND (0
	OR (t.FORUM_ID = 10 AND p.POST_POSTED_TIME > 1328522142)) GROUP BY t.FORUM_ID

So for some reason this code won't run in the live UBB system - it never shows up in the SQL logs. Thoughts on why adding SET NAMES UTF8 would interfere with this section of code not executing? The code right before it - getting the online browsing count - does execute. So something happens before it can then get the forum value. And it only jams if SET NAMES is on.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts