Do you have a particular category to select from? If so, you need to add 
that condition to your query. Assuming some_id is the id of the category 
you want:

db((db.forum_post.category == db.category.id) & (db.category.id == 
some_id)).select(db.**forum_post.ALL, orderby=~db.forum_post.id
, limitby=(0,1)) 

Or are you trying to do something else?

Anthony

On Wednesday, January 4, 2012 9:04:01 PM UTC-5, Andrew wrote:
>
> Hi no its not on GAE
>
> I do get the last post but its for the last category posted in here is a 
> link you can see :-)
>
> http://www.fireflywra.com/forum
>
> *cheers
>
>
> On Wed, Jan 4, 2012 at 5:10 PM, Anthony <abas...@gmail.com> wrote:
>
>> What do you get with that query? Is this on GAE (on GAE, I don't think 
>> the id's are necessarily in order)?
>>
>>
>> On Wednesday, January 4, 2012 6:20:36 PM UTC-5, Andrew wrote:
>>>
>>> In some forum code, I am trying to select the latest thread specific 
>>> to a forum category. But I am unsure how to do this 
>>>
>>> Any ideas are greatly appreciated 
>>>
>>> This is the code I tried with 
>>>
>>> {{last_posts = db(db.forum_post.category == 
>>> db.category.id).select(db.**forum_post.ALL, orderby=~db.forum_post.id, 
>>> limitby=(0,1))}}
>>
>>
>

Reply via email to