Closed dome closed 12 years ago
i use sort in query object it's work fine. but i need to to know how to add where? sort = {} sort['utime']=-1; q1,err = mongo.Query.New() ok,err = q1:sort(sort)
------ sone thing like that ---- twhere = {} ok,err = q1:where(twhere);
This should really be asked on the luamongo group (luamongo@googlegroups.com) You can do a query with a sort and a filter like this:
mongo:find("collection", {query = {field = value}, orderby = {field = 1}})
i use sort in query object it's work fine. but i need to to know how to add where? sort = {} sort['utime']=-1; q1,err = mongo.Query.New() ok,err = q1:sort(sort)
------ sone thing like that ---- twhere = {} ok,err = q1:where(twhere);