PDA

View Full Version : Retrieve userid instead of lastposter from '_thread' table...


tschai
02-06-2008, 06:31 PM
Hi all,

In the forum mainpage the lastposter ($lastposter) is been retrieved from the '_thread' table via 'member.php'
I want to show the avatar via the userid on this forumpage.

My question is:
-How could I possibly retrieve the userid via 'member.php'/'_thread' table of the lastposter (in order to show the accompanying avatar)?

or maybe easier

-How and where could I insert also the userid of the lastposter in the '_thread' table (in order the retrieve it dierctly later on)?

Any suggestions are welcome.

Thanks in advance.

Opserty
02-06-2008, 07:46 PM
You could maybe add a Join to the query using one of the hook locations on the forumdisplay page. forumdisplay_query I think it is. Then select the userid from the user table as you fetch the rest of the info.