snowboardr
Programmer
I am having problems with my SQL I am basicly trying to get two "thread" names from the same table (thread) here is what i have...
Code:
sql= "SELECT "_
& "post.pid,"_
& "post.ptid,"_
& "post.ptid2,"_
& "post.puid,"_
& "post.psubject,"_
& "post.ptype,"_
& "post.preplycount,"_
& "post.ptime,"_
& "post.psticky,"_
& "post.ptimereply,"_
& "user.uid,"_
& "user.uname,"_
& "th.tid,"_
& "th.tname as ThreadName1,"_
& "th2.tid,"_
& "th2.tname as ThreadName2,"_
& " FROM forumpost as post, users as user, thread as th, thread as th2 LEFT join on user.uid=post.puid WHERE post.ptype=0 AND th.tid=post.ptid AND th2.tid=post.ptid2 Order by DESC,post.pid DESC Limit " & sLimitPart