advanced SELECT statement

liunx

Guest
Hi I'm a n00b at mysql/php and I want to extend my SELECT statement.

This is for my own forum and the addition i want to make is a way to see who made the last post.
It is in swedish so if there are something you don't understand just ask me.

Here is a listing of my tables:

forum_inlagg (the posts)
Field Type Null Default extra
id int(11) No auto_increment
tradid int(11) No 0
personid int(11) No 0
tidstampel timestamp(14) Yes NULL
PRIMARY id

forum_tradar (the threads)
Field Type Null Default Extra
id int(11) No auto_increment
rubrik varchar(32) No
startpersonid int(11) No 0
category varchar(16) No
senastpersonid int(11) No 0
PRIMARY id

In forum_tradar I have added senastpersonid (last person id)
but my question is how to modify my SELECT statements. The whole code can be accessed here:
scenteknik.mlassi.com/forum.phps (<!-- m --><a class="postlink" href="http://scenteknik.mlassi.com/forum.phps">http://scenteknik.mlassi.com/forum.phps</a><!-- m -->)
scenteknik.mlassi.com/forum_t.phps (<!-- m --><a class="postlink" href="http://scenteknik.mlassi.com/forum_t.phps">http://scenteknik.mlassi.com/forum_t.phps</a><!-- m -->)
scenteknik.mlassi.com/forum_p.phps (<!-- m --><a class="postlink" href="http://scenteknik.mlassi.com/forum_p.phps">http://scenteknik.mlassi.com/forum_p.phps</a><!-- m -->)
 
Top