Welcome Guest, Not a member yet? Register   Sign In
view_post method for a forum
#1

[eluser]TheFuzzy0ne[/eluser]
I'd like to be able to find a posts position within it's parent topic by ID. I'd like to do this using the Active Record class, with no sub-selects id possible, and without adding an extra field to the database representing the position of that post.

So far, the best I could come up with, is simply to select the IDs of all of the posts in the topic, and iterate through those IDs to find the posts position. Does anyone else have any better ideas?

Many thanks.

The Fuzz.


Messages In This Thread
view_post method for a forum - by El Forum - 06-11-2009, 07:01 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:21 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:31 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:34 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:44 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:48 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:49 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:53 AM
view_post method for a forum - by El Forum - 06-11-2009, 07:57 AM
view_post method for a forum - by El Forum - 06-11-2009, 09:36 AM
view_post method for a forum - by El Forum - 06-11-2009, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB