MacMorag
08-03-2004, 01:56 PM
You know how sometimes you look at a problem for so long that you begin to wonder what it is you're trying to do in the first place? Well, I'm there :ermm:
What I'm trying to do:
Every thread has an associated 'first' post. Correct.
I would like to access a specific field in this 'first' post, for a dynamic range of threadids, and be able to access the contents of this field.
e.g. Thread with 'threadid' of '123', has a first post whose 'postid' is '456'. This post (postid=456) has a field called 'sample' which contains "ABC".
I'd like to access the contents of 'sample' when I only have the 'threadid' as a reference point to start with.
So 'threadid' 100 returns "ABC".
What SQL statement do I need to use to get to this data? I know how to extract the first 'postid' for a thread. How do I then extract a specific field from the post?
Thanks for any help.
What I'm trying to do:
Every thread has an associated 'first' post. Correct.
I would like to access a specific field in this 'first' post, for a dynamic range of threadids, and be able to access the contents of this field.
e.g. Thread with 'threadid' of '123', has a first post whose 'postid' is '456'. This post (postid=456) has a field called 'sample' which contains "ABC".
I'd like to access the contents of 'sample' when I only have the 'threadid' as a reference point to start with.
So 'threadid' 100 returns "ABC".
What SQL statement do I need to use to get to this data? I know how to extract the first 'postid' for a thread. How do I then extract a specific field from the post?
Thanks for any help.