It doesn't look like the mnesia erlydb driver supports ordering as  
well as the other erlydb drivers do. For instance, this doesn't work:

newest(Top,First) ->
   post:find({id,'>',1},
             [{order_by,[{created_on,desc}]},
              {limit,First,Top}]).

It fails with:

ERROR erlang  code  crashed:
File: appmod:0
Reason: "Unhandled extras"
Req: {http_request,'GET',{abs_path,"/post/newest"},{1,1}}

But this *does* work:

newest(Top,First) ->
   post:find({id,'>',1},
             [{order_by,created_on},
              {limit,First,Top}]).

(Note the simplified ordering.) The former looks almost exactly like  
the one under "Protection against SQL injection attacks" at <http:// 
yarivsblog.com/articles/2006/09/30/erlydb-0-7/>, so I would assume  
that it would work


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to