well what doy wou want to get exactly?
this part
Code:
FROM user,post,usergroup,thread
WHERE user.lastpost=post.dateline AND user.usergroupid=usergroup.usergroupid AND
post.threadid=thread.threadid
is very suspicious and will take a long time, poor DB
if you tell exactly what ya want i can maybe optimize that code also
aslo as a tip for future:
lear to use significant variable names.
i don't know what $bob should mean, but $usersinthread would be clear.