The sort part works, but the query doesn't. -wj
On Fri, Dec 5, 2008 at 11:23 AM, mdipierro <[EMAIL PROTECTED]> wrote: > > def scholarships(): > return dict(scholarship=t2.itemize > (db.scholarship,nitems=10,query=db.scholarship.enabled=='T',\ > orderby=db.scholarship.id|db.scholarship.otherfield)) > > On Dec 5, 11:48 am, "Wes James" <[EMAIL PROTECTED]> wrote: >> I have a field "enabled" in my scholarship table of type boolean. >> >> In sqlite and I can do: >> >> select name, enabled from scholarship where enabled=='T'; >> >> And I get just the enabled scholarships. >> >> but if I do: >> >> def scholarships(): >> return >> dict(scholarship=t2.itemize(db.scholarship,nitems=10),query=db.scholarship.enabled=='T',\ >> orderby=db.scholarship.id) >> >> then all the scholarships still get listed on the web page. Why? >> >> Also how do I "orderby" two fields. >> >> thx, >> >> -wj > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

