Note: You must be registered in order to post a reply. To register, click here. Registration is FREE! Before posting, make sure you have read this topic!
T O P I C R E V I E W
ILLHILL
Posted - 28 March 2006 : 15:32:42 Hi, I'm curious if anybody can help me with this. I think it can be applied to forums, but I ask it for my blog thingy.
What I want to do is add an extra field to the database with a value (covered!)
Then when posting a topic the author can select the type of topic, in my case that would be "Blog" or "News" by selecting on of those two a value will stay on 0 or be set to 1.
Now, what I need is to extract the latest 50 topics, which can be ne through this:
strSql = "SELECT TOP 50 T.T_SUBJECT, T.TOPIC_ID FROM " & strTablePrefix & "TOPICS T WHERE T.T_AUTHOR = " & ppMember_ID & " ORDER BY T.TOPIC_ID DESC"
Now, assuming the new field will be called TYPE, then where or how do I need to add the T.TYPE?
In the WHERE part? Like: AND T.TYPE="1" ? to select all fields with the 1 value or is it a bit more complex?
Please let me know.
Greets & thanks, Dominic<
1 L A T E S T R E P L I E S (Newest First)
ILLHILL
Posted - 28 March 2006 : 16:22:59 Just figured that this could probably be done through a string, as in
if StrTYPE="1" then Response.Write etc.
I'm going to play around with this. If anybody is interested, let me know so I can make a mini mod out of it when ready.